trivial code style cleanup round 2

This commit is contained in:
Daniel Agar
2015-03-27 23:38:58 -04:00
parent 5cc1a5dfda
commit 8aae66b893
56 changed files with 132 additions and 104 deletions
+2 -1
View File
@@ -97,7 +97,8 @@ void cpuload_initialize_once()
system_load.tasks[system_load.total_count].start_time = now;
system_load.tasks[system_load.total_count].total_runtime = 0;
system_load.tasks[system_load.total_count].curr_start_time = 0;
system_load.tasks[system_load.total_count].tcb = sched_gettcb(system_load.total_count); // it is assumed that these static threads have consecutive PIDs
system_load.tasks[system_load.total_count].tcb = sched_gettcb(
system_load.total_count); // it is assumed that these static threads have consecutive PIDs
system_load.tasks[system_load.total_count].valid = true;
}
}
+2 -2
View File
@@ -103,7 +103,7 @@ __EXPORT extern void hx_stream_reset(hx_stream_t stream);
/**
* Prepare to send a frame.
*
* Use this in conjunction with hx_stream_send_next to
* Use this in conjunction with hx_stream_send_next to
* set the frame to be transmitted.
*
* Use hx_stream_send() to write to the stream fd directly.
@@ -124,7 +124,7 @@ __EXPORT extern int hx_stream_start(hx_stream_t stream,
* calling hx_stream_start first.
*
* @param stream A handle returned from hx_stream_init.
* @return The byte to send, or -1 if there is
* @return The byte to send, or -1 if there is
* nothing left to send.
*/
__EXPORT extern int hx_stream_send_next(hx_stream_t stream);
+2 -2
View File
@@ -50,7 +50,7 @@ enum MCU_REV {
/**
* Reports the microcontroller unique id.
*
* This ID is guaranteed to be unique for every mcu.
* This ID is guaranteed to be unique for every mcu.
* @param uid_96_bit A uint32_t[3] array to copy the data to.
*/
__EXPORT void mcu_unique_id(uint32_t *uid_96_bit);
@@ -62,6 +62,6 @@ __EXPORT void mcu_unique_id(uint32_t *uid_96_bit);
* @param revstr The full chip name string
* @return The silicon revision / version number as integer
*/
__EXPORT int mcu_version(char* rev, char** revstr);
__EXPORT int mcu_version(char *rev, char **revstr);
__END_DECLS
+3 -1
View File
@@ -76,8 +76,9 @@ MixerGroup::add_mixer(Mixer *mixer)
mpp = &_first;
while (*mpp != nullptr)
while (*mpp != nullptr) {
mpp = &((*mpp)->_next);
}
*mpp = mixer;
mixer->_next = nullptr;
@@ -185,6 +186,7 @@ MixerGroup::load_from_buf(const char *buf, unsigned &buflen)
/* only adjust buflen if parsing was successful */
buflen = resid;
debug("SUCCESS - buflen: %d", buflen);
} else {
/*
+2 -1
View File
@@ -72,7 +72,8 @@ typedef struct {
__EXPORT void pwm_limit_init(pwm_limit_t *limit);
__EXPORT void pwm_limit_calc(const bool armed, const unsigned num_channels, const uint16_t *disarmed_pwm, const uint16_t *min_pwm, const uint16_t *max_pwm, const float *output, uint16_t *effective_pwm, pwm_limit_t *limit);
__EXPORT void pwm_limit_calc(const bool armed, const unsigned num_channels, const uint16_t *disarmed_pwm,
const uint16_t *min_pwm, const uint16_t *max_pwm, const float *output, uint16_t *effective_pwm, pwm_limit_t *limit);
__END_DECLS
+3 -2
View File
@@ -66,10 +66,11 @@ systemreset(bool to_bootloader)
/* XXX wow, this is evil - write a magic number into backup register zero */
*(uint32_t *)0x40002850 = 0xb007b007;
}
up_systemreset();
/* lock up here */
while(true);
while (true);
}
static void kill_task(FAR struct tcb_s *tcb, FAR void *arg);
@@ -87,7 +88,7 @@ static void kill_task(FAR struct tcb_s *tcb, FAR void *arg)
kill(tcb->pid, SIGUSR1);
}
int task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, main_t entry, char * const argv[])
int task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, main_t entry, char *const argv[])
{
int pid;