diff options
author | dequis <dx@dxzone.com.ar> | 2015-01-16 16:50:23 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-01-16 16:50:23 -0300 |
commit | 6b13103dad92d505e038c268af66aeb04b7b4d87 (patch) | |
tree | 42ea01f5040065df60917daca6605318ec4f28df /irc_channel.c | |
parent | 6f10697380c620065731a5beece95c0f5bd652a0 (diff) |
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
Diffstat (limited to 'irc_channel.c')
-rw-r--r-- | irc_channel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/irc_channel.c b/irc_channel.c index 05a3e0cf..0a6e11d2 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -574,7 +574,7 @@ static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg ) const char *s; /* Scan for non-whitespace chars followed by a colon: */ - for( s = msg; *s && !isspace( *s ) && *s != ':' && *s != ','; s ++ ) {} + for( s = msg; *s && !g_ascii_isspace( *s ) && *s != ':' && *s != ','; s ++ ) {} if( *s == ':' || *s == ',' ) { @@ -582,7 +582,7 @@ static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg ) memset( to, 0, sizeof( to ) ); strncpy( to, msg, s - msg ); - while( *(++s) && isspace( *s ) ) {} + while( *(++s) && g_ascii_isspace( *s ) ) {} msg = s; if( !( iu = irc_user_by_name( irc, to ) ) ) |