[easytag/wip/libsoup-cddb: 6/8] Replace a further use of strcasecmp()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/libsoup-cddb: 6/8] Replace a further use of strcasecmp()
- Date: Tue, 15 Mar 2016 19:36:41 +0000 (UTC)
commit 7b6ed9a64b00ced25a523d31d3ea0a8b53c3a5cf
Author: David King <amigadave amigadave com>
Date: Thu Mar 10 21:00:14 2016 +0000
Replace a further use of strcasecmp()
Ignore the locale when comparing CDDB genres.
src/cddb_dialog.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/cddb_dialog.c b/src/cddb_dialog.c
index 243c6ab..fd59768 100644
--- a/src/cddb_dialog.c
+++ b/src/cddb_dialog.c
@@ -2960,13 +2960,18 @@ et_cddb_dialog_search_from_selection (EtCDDBDialog *self)
static const gchar *
Cddb_Get_Id3_Genre_From_Cddb_Genre (const gchar *cddb_genre)
{
- guint i;
+ gsize i;
g_return_val_if_fail (cddb_genre != NULL, "");
- for (i=0; i<=CDDB_GENRE_MAX; i++)
- if (strcasecmp(cddb_genre,cddb_genre_vs_id3_genre[i][0])==0)
+ for (i = 0; i <= CDDB_GENRE_MAX; i++)
+ {
+ if (g_ascii_strcasecmp (cddb_genre, cddb_genre_vs_id3_genre[i][0]) == 0)
+ {
return cddb_genre_vs_id3_genre[i][1];
+ }
+ }
+
return cddb_genre;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]