summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenny Siegert <bsiegert@gmail.com>2015-09-26 22:31:32 +0200
committerBenny Siegert <bsiegert@gmail.com>2015-09-26 22:31:32 +0200
commit5a8d63de11de78854d83a4218c79cb203e6b5ea0 (patch)
tree3102ebdd5921ea412d6a6e10c6f0cd3f3134d8fc /src
parentc47a78f9c3f6d41de93db8bd572e985ed1c0878d (diff)
downloadlibpam-radius-auth-5a8d63de11de78854d83a4218c79cb203e6b5ea0.tar.gz
libpam-radius-auth-5a8d63de11de78854d83a4218c79cb203e6b5ea0.zip
Quell warnings for isdigit.
Explicitly cast the arg to isdigit to an unsigned char.
Diffstat (limited to 'src')
-rw-r--r--src/pam_radius_auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pam_radius_auth.c b/src/pam_radius_auth.c
index 210dbcc..694e7b4 100644
--- a/src/pam_radius_auth.c
+++ b/src/pam_radius_auth.c
@@ -209,7 +209,7 @@ static uint32_t ipstr2long(char *ip_str) {
*ptr = '\0';
while(*ip_str != '.' && *ip_str != '\0' && count < 4) {
- if (!isdigit(*ip_str)) {
+ if (!isdigit((unsigned char)*ip_str)) {
return (uint32_t)0;
}
*ptr++ = *ip_str++;
@@ -245,7 +245,7 @@ static int good_ipaddr(char *addr) {
if (*addr == '.') {
dot_count++;
digit_count = 0;
- } else if (!isdigit(*addr)) {
+ } else if (!isdigit((unsigned char)*addr)) {
dot_count = 5;
} else {
digit_count++;
@@ -298,7 +298,7 @@ static int host2server(radius_server_t *server)
* If the server port hasn't already been defined, go get it.
*/
if (!server->port) {
- if (p && isdigit(*p)) { /* the port looks like it's a number */
+ if (p && isdigit((unsigned char)*p)) { /* the port looks like it's a number */
unsigned int i = atoi(p) & 0xffff;
if (!server->accounting) {