Fix copyright.
[rsync/rsync.git] / access.c
index 046d5e3..050e8cc 100644 (file)
--- a/access.c
+++ b/access.c
@@ -34,7 +34,7 @@ static int match_hostname(char *host, char *tok)
 static int match_address(char *addr, char *tok)
 {
        char *p;
-       unsigned long a, t, mask = ~0;
+       unsigned long a, t, mask = (unsigned long)~0;
 
        if (!addr || !*addr) return 0;
 
@@ -68,6 +68,7 @@ static int match_address(char *addr, char *tok)
                        mask = ntohl(mask);
                } else {
                        int bits = atoi(p+1);
+                       if (bits == 0) return 1;
                        if (bits <= 0 || bits > 32) {
                                rprintf(FERROR,"malformed mask in %s\n", tok);
                                return 0;