From 847ee2bb2edf77e1376056a8f4c46e3c4f83b260 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Mon, 24 Oct 2022 17:35:04 -0400 Subject: [PATCH] bgpd: checkpatch fixes in bgp_io code Some checkpatch fixes for comments in the bgp_io code. Signed-off-by: Stephen Worley --- bgpd/bgp_io.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c index 4928e10b38..c8338d3d52 100644 --- a/bgpd/bgp_io.c +++ b/bgpd/bgp_io.c @@ -50,9 +50,9 @@ static void bgp_process_reads(struct thread *); static bool validate_header(struct peer *); /* generic i/o status codes */ -#define BGP_IO_TRANS_ERR (1 << 0) // EAGAIN or similar occurred -#define BGP_IO_FATAL_ERR (1 << 1) // some kind of fatal TCP error -#define BGP_IO_WORK_FULL_ERR (1 << 2) // No room in work buffer +#define BGP_IO_TRANS_ERR (1 << 0) /* EAGAIN or similar occurred */ +#define BGP_IO_FATAL_ERR (1 << 1) /* some kind of fatal TCP error */ +#define BGP_IO_WORK_FULL_ERR (1 << 2) /* No room in work buffer */ /* Thread external API ----------------------------------------------------- */ @@ -226,13 +226,13 @@ static int read_ibuf_work(struct peer *peer) static void bgp_process_reads(struct thread *thread) { /* clang-format off */ - static struct peer *peer; // peer to read from - uint16_t status; // bgp_read status code - bool fatal = false; // whether fatal error occurred - bool added_pkt = false; // whether we pushed onto ->ibuf - int code = 0; // FSM code if error occurred - bool ibuf_full = false; // Is peer fifo IN Buffer full - static bool ibuf_full_logged; // Have we logged full already + static struct peer *peer; /* peer to read from */ + uint16_t status; /* bgp_read status code */ + bool fatal = false; /* whether fatal error occurred */ + bool added_pkt = false; /* whether we pushed onto ->ibuf */ + int code = 0; /* FSM code if error occurred */ + bool ibuf_full = false; /* Is peer fifo IN Buffer full */ + static bool ibuf_full_logged; /* Have we logged full already */ int ret = 1; /* clang-format on */ @@ -502,9 +502,9 @@ done : { */ static uint16_t bgp_read(struct peer *peer, int *code_p) { - size_t readsize; // how many bytes we want to read - ssize_t nbytes; // how many bytes we actually read - size_t ibuf_work_space; // how much space we can read into the work buf + size_t readsize; /* how many bytes we want to read */ + ssize_t nbytes; /* how many bytes we actually read */ + size_t ibuf_work_space; /* space we can read into the work buf */ uint16_t status = 0; ibuf_work_space = ringbuf_space(peer->ibuf_work);