From e9b14372ea08ab8baca04b09e77da0c6a9cb2e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?shuxin=20=E3=80=80=E3=80=80zheng?= Date: Tue, 11 Jul 2023 18:18:56 +0800 Subject: [PATCH] compiling on MacOS --- lib_fiber/c/src/dns/valid_hostname.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib_fiber/c/src/dns/valid_hostname.c b/lib_fiber/c/src/dns/valid_hostname.c index af50cfe3d..06215eb7d 100644 --- a/lib_fiber/c/src/dns/valid_hostname.c +++ b/lib_fiber/c/src/dns/valid_hostname.c @@ -10,7 +10,6 @@ int valid_hostname(const char *name, int gripe) char *myname = "valid_hostname"; const char *cp; int label_length = 0; - int label_count = 0; int non_numeric = 0; int ch; @@ -28,8 +27,6 @@ int valid_hostname(const char *name, int gripe) */ for (cp = name; (ch = *(const unsigned char *) cp) != 0; cp++) { if (isalnum(ch) || ch == '_') { /* grr.. */ - if (label_length == 0) - label_count++; label_length++; if (label_length > VALID_LABEL_LEN) { if (gripe)