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 /otr.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 'otr.c')
-rw-r--r-- | otr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1469,7 +1469,7 @@ irc_user_t *peeruser(irc_t *irc, const char *handle, const char *protocol) int hexval(char a) { - int x=tolower(a); + int x=g_ascii_tolower(a); if(x>='a' && x<='f') x = x - 'a' + 10; @@ -1556,7 +1556,7 @@ Fingerprint *match_fingerprint(irc_t *irc, ConnContext *ctx, const char **args) p=prefix; for(i=0; args[i]; i++) { for(j=0; args[i][j]; j++) { - char c = toupper(args[i][j]); + char c = g_ascii_toupper(args[i][j]); if(n>=40) { irc_rootmsg(irc, "too many fingerprint digits given, expected at most 40"); @@ -1620,7 +1620,7 @@ OtrlPrivKey *match_privkey(irc_t *irc, const char **args) p=prefix; for(i=0; args[i]; i++) { for(j=0; args[i][j]; j++) { - char c = toupper(args[i][j]); + char c = g_ascii_toupper(args[i][j]); if(n>=40) { irc_rootmsg(irc, "too many fingerprint digits given, expected at most 40"); |