Changeset 6b13103 for irc_channel.c


Ignore:
Timestamp:
2015-01-16T19:50:23Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
1065dd4, eabe6d4
Parents:
6f10697
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    r6f10697 r6b13103  
    575575       
    576576        /* Scan for non-whitespace chars followed by a colon: */
    577         for( s = msg; *s && !isspace( *s ) && *s != ':' && *s != ','; s ++ ) {}
     577        for( s = msg; *s && !g_ascii_isspace( *s ) && *s != ':' && *s != ','; s ++ ) {}
    578578       
    579579        if( *s == ':' || *s == ',' )
     
    583583                memset( to, 0, sizeof( to ) );
    584584                strncpy( to, msg, s - msg );
    585                 while( *(++s) && isspace( *s ) ) {}
     585                while( *(++s) && g_ascii_isspace( *s ) ) {}
    586586                msg = s;
    587587               
Note: See TracChangeset for help on using the changeset viewer.