summaryrefslogtreecommitdiff
path: root/src/fe-common/core/themes.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-04-07 22:39:05 -0300
committerdequis <dx@dxzone.com.ar>2015-04-07 22:41:05 -0300
commitf14199d9c15a8062b5663fa6fcdae00390473b15 (patch)
tree730f9fdb49b2e1f26dd56422f83e6b6ab9867d8a /src/fe-common/core/themes.c
parent9ffe52ec5e3f0643e7ddd12f4d21c0788d2f8cea (diff)
downloadirssi-f14199d9c15a8062b5663fa6fcdae00390473b15.zip
Change all strcmp() to g_strcmp0() to handle nulls gracefully
Just a string replacement (but i did check every one of them) sed -i 's/strcmp(/g_strcmp0(/g' **/*.c
Diffstat (limited to 'src/fe-common/core/themes.c')
-rw-r--r--src/fe-common/core/themes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c
index c0741cef..0ef98fee 100644
--- a/src/fe-common/core/themes.c
+++ b/src/fe-common/core/themes.c
@@ -895,7 +895,7 @@ THEME_REC *theme_load(const char *setname)
name = g_strdup(setname);
p = strrchr(name, '.');
- if (p != NULL && strcmp(p, ".theme") == 0) {
+ if (p != NULL && g_strcmp0(p, ".theme") == 0) {
/* remove the trailing .theme */
*p = '\0';
}
@@ -1358,9 +1358,9 @@ static void read_settings(void)
theme = settings_get_str("theme");
len = strlen(current_theme->name);
- if (strcmp(current_theme->name, theme) != 0 &&
+ if (g_strcmp0(current_theme->name, theme) != 0 &&
(strncmp(current_theme->name, theme, len) != 0 ||
- strcmp(theme+len, ".theme") != 0))
+ g_strcmp0(theme+len, ".theme") != 0))
change_theme(theme, TRUE);
}