Optimized show_progress() to reduce the calls to gettimeofday() when
[rsync/rsync.git] / access.c
index 710a1af..25a0680 100644 (file)
--- a/access.c
+++ b/access.c
@@ -86,10 +86,9 @@ static int match_address(char *addr, char *tok)
                len = strlen(tok);
 
        /* Fail quietly if tok is a hostname (not an address) */
-       if (strspn(tok, "./0123456789") != len
+       if (strspn(tok, ".0123456789") != len
 #ifdef INET6
-        && strspn(tok, "/0123456789:ABCDEFabcdef") != len
-        && !strchr(tok, '%')
+        && !strchr(tok, ':')
 #endif
                ) return 0;