diff options
author | deraadt <deraadt@openbsd.org> | 2015-01-16 06:39:28 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2015-01-16 06:39:28 +0000 |
commit | b9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch) | |
tree | 72b2433e418dfa1aef5fcf8305617b97979a25d8 /libexec/spamd-setup | |
parent | improve checksum parsing slightly. now handles filenames with spaces. (diff) | |
download | wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip |
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'libexec/spamd-setup')
-rw-r--r-- | libexec/spamd-setup/spamd-setup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/spamd-setup/spamd-setup.c b/libexec/spamd-setup/spamd-setup.c index d88b31181db..9f37ee1c182 100644 --- a/libexec/spamd-setup/spamd-setup.c +++ b/libexec/spamd-setup/spamd-setup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spamd-setup.c,v 1.42 2015/01/14 11:59:10 millert Exp $ */ +/* $OpenBSD: spamd-setup.c,v 1.43 2015/01/16 06:39:50 deraadt Exp $ */ /* * Copyright (c) 2003 Bob Beck. All rights reserved. @@ -89,6 +89,8 @@ int greyonly = 1; extern char *__progname; +#define MAXIMUM(a,b) (((a)>(b))?(a):(b)) + u_int32_t imask(u_int8_t b) { @@ -140,7 +142,7 @@ range2cidrlist(struct cidr *list, u_int *cli, u_int *cls, u_int32_t start, maxsize = maxblock(start, 32); diff = maxdiff(start, end); - maxsize = MAX(maxsize, diff); + maxsize = MAXIMUM(maxsize, diff); if (*cls <= *cli + 1) { /* one extra for terminator */ tmp = reallocarray(list, *cls + 32, sizeof(struct cidr)); |