1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Use g_ascii_str{,n}casecmp for case insensitive comparison with

ascii only strings.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4772 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-03-15 13:27:17 +00:00 committed by exg
parent 4b4980badd
commit 52053f1717
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ int level_get(const char *level)
/* partial match allowed, as long as it's the only one that matches */ /* partial match allowed, as long as it's the only one that matches */
match = 0; match = 0;
for (n = 0; levels[n] != NULL; n++) { for (n = 0; levels[n] != NULL; n++) {
if (g_strncasecmp(levels[n], level, len) == 0) { if (g_ascii_strncasecmp(levels[n], level, len) == 0) {
if ((int)strlen(levels[n]) == len) { if ((int)strlen(levels[n]) == len) {
/* full match */ /* full match */
return 1L << n; return 1L << n;

View File

@ -55,7 +55,7 @@ static int log_item_str2type(const char *type)
int n; int n;
for (n = 0; log_item_types[n] != NULL; n++) { for (n = 0; log_item_types[n] != NULL; n++) {
if (g_strcasecmp(log_item_types[n], type) == 0) if (g_ascii_strcasecmp(log_item_types[n], type) == 0)
return n; return n;
} }