[easytag] Replace a further use of strcasecmp()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Replace a further use of strcasecmp()
- Date: Tue, 28 Jun 2016 17:44:40 +0000 (UTC)
commit 954d43d50ef4477c3648153580ea72daf540e612
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 a26badb..097188e 100644
--- a/src/cddb_dialog.c
+++ b/src/cddb_dialog.c
@@ -3454,13 +3454,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]