aboutsummaryrefslogtreecommitdiff
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-21 19:57:40 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-21 19:57:40 +0000
commitd9c9c81c083a76a65c6cacf8fcbc0511e2ffa489 (patch)
treecd4dfa8859a5f57124d315ff395b524d7587e1ea /sys/net/bpf.c
parent5977d3e898348ce714243a4189cee906151aa522 (diff)
downloadsrc-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.tar.gz
src-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.zip
sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
Notes
Notes: svn path=/head/; revision=298433
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 740aea8734c8..3b12cf4cb501 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -121,7 +121,7 @@ CTASSERT(offsetof(struct bpf_if, bif_ext) == 0);
#include <sys/mount.h>
#include <compat/freebsd32/freebsd32.h>
#define BPF_ALIGNMENT32 sizeof(int32_t)
-#define BPF_WORDALIGN32(x) (((x)+(BPF_ALIGNMENT32-1))&~(BPF_ALIGNMENT32-1))
+#define BPF_WORDALIGN32(x) roundup2(x, BPF_ALIGNMENT32)
#ifndef BURN_BRIDGES
/*