Compiler warns about uninitialized value, although in practice it is
unreachable.
Also updates a function comment explaining what that value does.
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
bool more = true; // whether we got more data
bool fatal = false; // whether fatal error occurred
bool added_pkt = false; // whether we pushed onto ->ibuf
+ int code = 0; // FSM code if error occurred
/* clang-format on */
- int code;
peer = THREAD_ARG(thread);
/*
* Reads a chunk of data from peer->fd into peer->ibuf_work.
*
+ * code_p
+ * Pointer to location to store FSM event code in case of fatal error.
+ *
* @return status flag (see top-of-file)
*/
static uint16_t bgp_read(struct peer *peer, int *code_p)