Skip to content

Commit

Permalink
Move queue_next_elem() outside of the switch block (fix #52)
Browse files Browse the repository at this point in the history
  • Loading branch information
3cky committed Jul 8, 2019
1 parent b2effb1 commit c582e6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,6 @@ conn_loop(void)
conn_tty_start(&tty, curconn);
}
}
curconn = queue_next_elem(&queue, curconn);
break;
case CONN_RESP:
if (FD_ISSET(curconn->sd, &sdsetwr))
Expand All @@ -875,9 +874,9 @@ conn_loop(void)
if (curconn->ctr == (MB_FRAME(curconn->buf, MB_LENGTH_L) + HDRSIZE))
state_conn_set(curconn, CONN_HEADER);
}
curconn = queue_next_elem(&queue, curconn);
break;
} /* switch (curconn->state) */
curconn = queue_next_elem(&queue, curconn);
} /* while (len--) */
} /* while (TRUE) */

Expand Down

0 comments on commit c582e6f

Please sign in to comment.