aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-01-16 16:50:23 -0300
committerdequis <dx@dxzone.com.ar>2015-01-16 16:50:23 -0300
commit6b13103dad92d505e038c268af66aeb04b7b4d87 (patch)
tree42ea01f5040065df60917daca6605318ec4f28df /protocols/jabber
parent6f10697380c620065731a5beece95c0f5bd652a0 (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 'protocols/jabber')
-rw-r--r--protocols/jabber/jabber_util.c4
-rw-r--r--protocols/jabber/sasl.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c
index fb68c33d..9d8011f8 100644
--- a/protocols/jabber/jabber_util.c
+++ b/protocols/jabber/jabber_util.c
@@ -320,7 +320,7 @@ int jabber_compare_jid( const char *jid1, const char *jid2 )
break;
return FALSE;
}
- if( tolower( jid1[i] ) != tolower( jid2[i] ) )
+ if( g_ascii_tolower( jid1[i] ) != g_ascii_tolower( jid2[i] ) )
{
return FALSE;
}
@@ -341,7 +341,7 @@ char *jabber_normalize( const char *orig )
/* So it turns out the /resource part is case sensitive. Yeah, and
it's Unicode but feck Unicode. :-P So stop once we see a slash. */
for( i = 0; i < len && orig[i] != '/' ; i ++ )
- new[i] = tolower( orig[i] );
+ new[i] = g_ascii_tolower( orig[i] );
for( ; orig[i]; i ++ )
new[i] = orig[i];
diff --git a/protocols/jabber/sasl.c b/protocols/jabber/sasl.c
index a4d1f6c1..65da529a 100644
--- a/protocols/jabber/sasl.c
+++ b/protocols/jabber/sasl.c
@@ -186,7 +186,7 @@ char *sasl_get_part( char *data, char *field )
len = strlen( field );
- while( isspace( *data ) || *data == ',' )
+ while( g_ascii_isspace( *data ) || *data == ',' )
data ++;
if( g_strncasecmp( data, field, len ) == 0 && data[len] == '=' )
@@ -209,7 +209,7 @@ char *sasl_get_part( char *data, char *field )
find the next key after it. */
if( data[i] == ',' )
{
- while( isspace( data[i] ) || data[i] == ',' )
+ while( g_ascii_isspace( data[i] ) || data[i] == ',' )
i ++;
if( g_strncasecmp( data + i, field, len ) == 0 &&