summaryrefslogtreecommitdiff
path: root/access.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-14 00:53:43 +0000
committerWayne Davison <wayned@samba.org>2005-02-14 00:53:43 +0000
commit4f5b0756df0dfc925b9576db47ecce949c378e18 (patch)
tree770662e2442bc1f022e592d46a4489948f8be2ac /access.c
parentfe1c19dcdfa000c2461e85ed7bf712de49904377 (diff)
downloadrsync-4f5b0756df0dfc925b9576db47ecce949c378e18.tar.gz
rsync-4f5b0756df0dfc925b9576db47ecce949c378e18.tar.bz2
rsync-4f5b0756df0dfc925b9576db47ecce949c378e18.zip
John E. Malmberg convinced me to standardize on #ifs for defined
values instead of non-zero.
Diffstat (limited to 'access.c')
-rw-r--r--access.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/access.c b/access.c
index f8dd593f..9def1b2c 100644
--- a/access.c
+++ b/access.c
@@ -67,7 +67,7 @@ static int match_address(char *addr, char *tok)
int gai;
int ret = 0;
int addrlen = 0;
-#if HAVE_STRTOL
+#ifdef HAVE_STRTOL
long int bits;
#else
int bits;
@@ -88,7 +88,7 @@ static int match_address(char *addr, char *tok)
/* Fail quietly if tok is a hostname (not an address) */
if (strspn(tok, ".0123456789") != len
-#if INET6
+#ifdef INET6
&& strchr(tok, ':') == NULL
#endif
) {
@@ -133,7 +133,7 @@ static int match_address(char *addr, char *tok)
break;
-#if INET6
+#ifdef INET6
case PF_INET6:
{
struct sockaddr_in6 *sin6a, *sin6t;
@@ -146,7 +146,7 @@ static int match_address(char *addr, char *tok)
addrlen = 16;
-#if HAVE_SOCKADDR_IN6_SCOPE_ID
+#ifdef HAVE_SOCKADDR_IN6_SCOPE_ID
if (sin6t->sin6_scope_id &&
sin6a->sin6_scope_id != sin6t->sin6_scope_id) {
ret = 0;
@@ -166,13 +166,13 @@ static int match_address(char *addr, char *tok)
bits = -1;
if (p) {
if (inet_pton(resa->ai_addr->sa_family, p, mask) <= 0) {
-#if HAVE_STRTOL
+#ifdef HAVE_STRTOL
char *ep = NULL;
#else
unsigned char *pp;
#endif
-#if HAVE_STRTOL
+#ifdef HAVE_STRTOL
bits = strtol(p, &ep, 10);
if (!*p || *ep) {
rprintf(FLOG, "malformed mask in %s\n", tok);