Changeset 6b13103 for irc_util.c


Ignore:
Timestamp:
2015-01-16T19:50:23Z (7 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_util.c

    r6f10697 r6b13103  
    4242       
    4343        /* \d+ */
    44         if( !isdigit( *s ) )
     44        if( !g_ascii_isdigit( *s ) )
    4545                return SET_INVALID;
    46         while( *s && isdigit( *s ) ) s ++;
     46        while( *s && g_ascii_isdigit( *s ) ) s ++;
    4747       
    4848        /* EOS? */
     
    5656       
    5757        /* \d+ */
    58         if( !isdigit( *s ) )
     58        if( !g_ascii_isdigit( *s ) )
    5959                return SET_INVALID;
    60         while( *s && isdigit( *s ) ) s ++;
     60        while( *s && g_ascii_isdigit( *s ) ) s ++;
    6161       
    6262        /* EOS */
Note: See TracChangeset for help on using the changeset viewer.