Changeset 6b13103 for protocols/msn


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

Location:
protocols/msn
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    r6f10697 r6b13103  
    377377        g_tree_insert( md->domaintree, bu->handle, bu );
    378378       
    379         for( handle = bu->handle; isdigit( *handle ); handle ++ );
     379        for( handle = bu->handle; g_ascii_isdigit( *handle ); handle ++ );
    380380        if( *handle == ':' )
    381381        {
  • protocols/msn/ns.c

    r6f10697 r6b13103  
    581581                ic->flags |= OPT_PONGED;
    582582        }
    583         else if( isdigit( cmd[0][0] ) )
     583        else if( g_ascii_isdigit( cmd[0][0] ) )
    584584        {
    585585                int num = atoi( cmd[0] );
     
    997997        /* This might be a federated contact. Get its network number,
    998998           prefixed to bu->handle with a colon. Default is 1. */
    999         for( handle = bu->handle; isdigit( *handle ); handle ++ )
     999        for( handle = bu->handle; g_ascii_isdigit( *handle ); handle ++ )
    10001000                type = type * 10 + *handle - '0';
    10011001        if( *handle == ':' )
  • protocols/msn/sb.c

    r6f10697 r6b13103  
    506506        else if( strcmp( cmd[0], "CAL" ) == 0 )
    507507        {
    508                 if( num_parts < 4 || !isdigit( cmd[3][0] ) )
     508                if( num_parts < 4 || !g_ascii_isdigit( cmd[3][0] ) )
    509509                {
    510510                        msn_sb_destroy( sb );
     
    645645                }
    646646        }
    647         else if( isdigit( cmd[0][0] ) )
     647        else if( g_ascii_isdigit( cmd[0][0] ) )
    648648        {
    649649                int num = atoi( cmd[0] );
Note: See TracChangeset for help on using the changeset viewer.