From: Amos Jeffries Date: Wed, 12 May 2010 04:04:11 +0000 (+1200) Subject: Author: R Phillips X-Git-Tag: SQUID_3_1_4~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a44f996bb0bf432b07f007ddc7a54f36275dde5c;p=thirdparty%2Fsquid.git Author: R Phillips Bug 2924: RADIUS helper compile issues --- diff --git a/helpers/basic_auth/squid_radius_auth/radius-util.c b/helpers/basic_auth/squid_radius_auth/radius-util.c index 4388dcc96e..29969ad508 100644 --- a/helpers/basic_auth/squid_radius_auth/radius-util.c +++ b/helpers/basic_auth/squid_radius_auth/radius-util.c @@ -90,7 +90,7 @@ static int good_ipaddr(char *addr) if (*addr == '.') { dot_count++; digit_count = 0; - } else if (!isdigit(*addr)) { + } else if (!isdigit((int)*addr)) { dot_count = 5; } else { digit_count++; @@ -126,7 +126,7 @@ static u_int32_t ipstr2long(char *ip_str) count = 0; *ptr = '\0'; while (*ip_str != '.' && *ip_str != '\0' && count < 4) { - if (!isdigit(*ip_str)) { + if (!isdigit((int)*ip_str)) { return((u_int32_t)0); } *ptr++ = *ip_str++; diff --git a/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c b/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c index 8e59ba464d..bc947148f2 100644 --- a/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c +++ b/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c @@ -572,7 +572,7 @@ main(int argc, char **argv) /* Parse out the username and password */ ptr = authstring; - while (isspace(*ptr)) + while (isspace((int)*ptr)) ptr++; if ((end = strchr(ptr, ' ')) == NULL) { printf("ERR\n"); /* No password */ @@ -581,7 +581,7 @@ main(int argc, char **argv) *end = '\0'; urldecode(username, ptr, MAXPWNAM); ptr = end + 1; - while (isspace(*ptr)) + while (isspace((int)*ptr)) ptr++; urldecode(passwd, ptr, MAXPASS);