mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
bgpd: fix uninit value when handling bgp read errs
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>
This commit is contained in:
parent
dc92ca52c5
commit
b8cfb2cd41
@ -180,8 +180,8 @@ static int bgp_process_reads(struct thread *thread)
|
|||||||
bool more = true; // whether we got more data
|
bool more = true; // whether we got more data
|
||||||
bool fatal = false; // whether fatal error occurred
|
bool fatal = false; // whether fatal error occurred
|
||||||
bool added_pkt = false; // whether we pushed onto ->ibuf
|
bool added_pkt = false; // whether we pushed onto ->ibuf
|
||||||
|
int code = 0; // FSM code if error occurred
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
int code;
|
|
||||||
|
|
||||||
peer = THREAD_ARG(thread);
|
peer = THREAD_ARG(thread);
|
||||||
|
|
||||||
@ -455,6 +455,9 @@ done : {
|
|||||||
/*
|
/*
|
||||||
* Reads a chunk of data from peer->fd into peer->ibuf_work.
|
* 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)
|
* @return status flag (see top-of-file)
|
||||||
*/
|
*/
|
||||||
static uint16_t bgp_read(struct peer *peer, int *code_p)
|
static uint16_t bgp_read(struct peer *peer, int *code_p)
|
||||||
|
Loading…
Reference in New Issue
Block a user