summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r--usr.sbin/ldpd/kroute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c
index 7e20c40f5c1..3b0fd90f7cb 100644
--- a/usr.sbin/ldpd/kroute.c
+++ b/usr.sbin/ldpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.65 2017/03/04 00:21:48 renato Exp $ */
+/* $OpenBSD: kroute.c,v 1.66 2017/07/24 11:00:01 friehm Exp $ */
/*
* Copyright (c) 2015, 2016 Renato Westphal <renato@openbsd.org>
@@ -947,8 +947,8 @@ prefixlen_classful(in_addr_t ina)
return (8);
}
-#define ROUNDUP(a) \
- (((a) & (sizeof(long) - 1)) ? (1 + ((a) | (sizeof(long) - 1))) : (a))
+#define ROUNDUP(a) \
+ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
static void
get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)