From 6b13103dad92d505e038c268af66aeb04b7b4d87 Mon Sep 17 00:00:00 2001 From: dequis Date: Fri, 16 Jan 2015 16:50:23 -0300 Subject: Replace isdigit/isalpha/.../tolower/toupper with glib variants This fixes warnings about passing signed chars to them (apparently they are implemented as macros that do array lookups without checks in some platforms, yay) Specifically: functions=isalnum|isalpha|isdigit|isspace|isxdigit|tolower|toupper sed -ir "s/$functions/g_ascii_&/g" **/*.c --- irc_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'irc_util.c') diff --git a/irc_util.c b/irc_util.c index 49deb315..f4581a08 100644 --- a/irc_util.c +++ b/irc_util.c @@ -41,9 +41,9 @@ char *set_eval_timezone( set_t *set, char *value ) s ++; /* \d+ */ - if( !isdigit( *s ) ) + if( !g_ascii_isdigit( *s ) ) return SET_INVALID; - while( *s && isdigit( *s ) ) s ++; + while( *s && g_ascii_isdigit( *s ) ) s ++; /* EOS? */ if( *s == '\0' ) @@ -55,9 +55,9 @@ char *set_eval_timezone( set_t *set, char *value ) s ++; /* \d+ */ - if( !isdigit( *s ) ) + if( !g_ascii_isdigit( *s ) ) return SET_INVALID; - while( *s && isdigit( *s ) ) s ++; + while( *s && g_ascii_isdigit( *s ) ) s ++; /* EOS */ return *s == '\0' ? value : SET_INVALID; -- cgit v1.2.3