]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: checkpatch fixes in bgp_io code
authorStephen Worley <sworley@nvidia.com>
Mon, 24 Oct 2022 21:35:04 +0000 (17:35 -0400)
committerStephen Worley <sworley@nvidia.com>
Mon, 24 Oct 2022 22:25:56 +0000 (18:25 -0400)
Some checkpatch fixes for comments in the bgp_io code.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
bgpd/bgp_io.c

index 4928e10b38f00d438a7147928d2cd9cdc97283a4..c8338d3d52992c3727599978a36c10dcf61b890f 100644 (file)
@@ -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);