Hi,

I am submitting a minor patch for sys/net/bpf.c.

* Wrap ROTATE_BUFFERS() macro in do-while according to knf,
  so it could be used in an "if" statement

No binary change on i386.
I'm not sure if this is important enough...

- Michael


Index: bpf.c
===================================================================
RCS file: /cvs/src/sys/net/bpf.c,v
retrieving revision 1.83
diff -u -r1.83 bpf.c
--- bpf.c       28 Dec 2012 17:52:06 -0000      1.83
+++ bpf.c       2 Jan 2013 05:09:58 -0000
@@ -369,12 +369,13 @@
  * into the hold slot, and the free buffer into the store slot.
  * Zero the length of the new store buffer.
  */
-#define ROTATE_BUFFERS(d) \
-       (d)->bd_hbuf = (d)->bd_sbuf; \
-       (d)->bd_hlen = (d)->bd_slen; \
-       (d)->bd_sbuf = (d)->bd_fbuf; \
-       (d)->bd_slen = 0; \
-       (d)->bd_fbuf = 0;
+#define ROTATE_BUFFERS(d) do { \
+               (d)->bd_hbuf = (d)->bd_sbuf; \
+               (d)->bd_hlen = (d)->bd_slen; \
+               (d)->bd_sbuf = (d)->bd_fbuf; \
+               (d)->bd_slen = 0; \
+               (d)->bd_fbuf = 0; \
+       } while (0)
 /*
  *  bpfread - read next chunk of packets from buffers
  */

Reply via email to