diff options
author | Max Kellermann <max@duempel.org> | 2008-10-03 11:50:30 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-03 11:50:30 +0200 |
commit | 8b2ace4bc265abde352fcd386ce5f88b88461f4d (patch) | |
tree | 19ab87266a0f5bc0ba036e676746deab3776636e /src/conf.c | |
parent | 12ad417fd296daeecff41671b9ab70a3252b4a19 (diff) | |
download | mpd-8b2ace4bc265abde352fcd386ce5f88b88461f4d.tar.gz mpd-8b2ace4bc265abde352fcd386ce5f88b88461f4d.tar.xz mpd-8b2ace4bc265abde352fcd386ce5f88b88461f4d.zip |
use g_ascii_strdown() instead of the custom lowerstr()
Don't duplicate code which is already provided by glib.
Diffstat (limited to 'src/conf.c')
-rw-r--r-- | src/conf.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/conf.c b/src/conf.c index 05eb28ff7..ff627e0b6 100644 --- a/src/conf.c +++ b/src/conf.c @@ -332,14 +332,15 @@ check_screen_list(char *value) i=0; j=0; while( tmp && tmp[i] ) { - tmp[i] = lowerstr(tmp[i]); - if (screen_lookup_name(tmp[i]) == NULL) + char *name = g_ascii_strdown(tmp[i], -1); + if (screen_lookup_name(name) == NULL) { fprintf(stderr, _("Error: Unsupported screen \"%s\"\n"), - tmp[i]); - else { + name); + free(name); + } else { screen = g_realloc(screen, (j+2)*sizeof(char *)); - screen[j++] = g_strdup(tmp[i]); + screen[j++] = name; screen[j] = NULL; } i++; |