Fix cosmetic issues around scheduler_set_channel_state

Whitespace issues

Line length

Unused variable
This commit is contained in:
Matt Traudt 2017-12-11 08:56:03 -05:00
parent ad5cfa3039
commit 5e7fdb8b3f
2 changed files with 16 additions and 15 deletions

View file

@ -361,12 +361,15 @@ set_scheduler(void)
* *
* Functions that can only be accessed from scheduler*.c * Functions that can only be accessed from scheduler*.c
*****************************************************************************/ *****************************************************************************/
/* Function to log and change all the old and new states*/
/** Helper that logs channel scheduler_state changes. Use this instead of
* setting scheduler_state directly. */
void scheduler_set_channel_state(channel_t *chan, int new_state){ void scheduler_set_channel_state(channel_t *chan, int new_state){
log_debug(LD_SCHED, "chan %s changed from scheduler state %d to %d",chan->global_identifier, chan->scheduler_state, new_state); log_debug(LD_SCHED, "chan %s changed from scheduler state %d to %d",
chan->global_identifier, chan->scheduler_state, new_state);
chan->scheduler_state = new_state; chan->scheduler_state = new_state;
} }
/** Return the pending channel list. */ /** Return the pending channel list. */
smartlist_t * smartlist_t *
get_channels_pending(void) get_channels_pending(void)
@ -705,7 +708,6 @@ scheduler_bug_occurred(const channel_t *chan)
char buf[128]; char buf[128];
if (chan != NULL) { if (chan != NULL) {
int new_state=0;
const size_t outbuf_len = const size_t outbuf_len =
buf_datalen(TO_CONN(BASE_CHAN_TO_TLS((channel_t *) chan)->conn)->outbuf); buf_datalen(TO_CONN(BASE_CHAN_TO_TLS((channel_t *) chan)->conn)->outbuf);
tor_snprintf(buf, sizeof(buf), tor_snprintf(buf, sizeof(buf),

View file

@ -143,7 +143,6 @@ MOCK_DECL(void, scheduler_channel_has_waiting_cells, (channel_t *chan));
/********************************* /*********************************
* Defined in scheduler.c * Defined in scheduler.c
*********************************/ *********************************/
/* Function to log and change all the old and new states*/
void scheduler_set_channel_state(channel_t *chan, int new_state); void scheduler_set_channel_state(channel_t *chan, int new_state);