summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-06-13 07:05:27 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-06-13 07:05:27 +0000
commit6b6ec934fb9602288ae9acf6b249b34c8d1ce8a3 (patch)
tree9c19efc22758d510ebb35ce991fd806c40207726 /usr.sbin
parent31a58aca824891e7ed7fa4145af587674c24a34b (diff)
Simplify ROUNDUP() macro, it does not need the additional size argument.
That will be sizeof(long) no matter what.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospfd/kroute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c
index 0ef083e9a92..a146d95d7e1 100644
--- a/usr.sbin/ospfd/kroute.c
+++ b/usr.sbin/ospfd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.57 2008/05/09 12:46:45 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.58 2008/06/13 07:05:26 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -909,8 +909,8 @@ prefixlen2mask(u_int8_t prefixlen)
return (htonl(0xffffffff << (32 - prefixlen)));
}
-#define ROUNDUP(a, size) \
- (((a) & ((size) - 1)) ? (1 + ((a) | ((size) - 1))) : (a))
+#define ROUNDUP(a) \
+ (((a) & (sizeof(long) - 1)) ? (1 + ((a) | (sizeof(long) - 1))) : (a))
void
get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
@@ -921,7 +921,7 @@ get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
if (addrs & (1 << i)) {
rti_info[i] = sa;
sa = (struct sockaddr *)((char *)(sa) +
- ROUNDUP(sa->sa_len, sizeof(long)));
+ ROUNDUP(sa->sa_len));
} else
rti_info[i] = NULL;
}