summaryrefslogtreecommitdiff
path: root/src/core/levels.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/core/levels.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/core/levels.c')
-rw-r--r--src/core/levels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/levels.c b/src/core/levels.c
index 7997ba98..e623c4de 100644
--- a/src/core/levels.c
+++ b/src/core/levels.c
@@ -54,7 +54,7 @@ int level_get(const char *level)
{
int n, len, match;
- if (g_ascii_strcasecmp(level, "ALL") == 0 || strcmp(level, "*") == 0)
+ if (g_ascii_strcasecmp(level, "ALL") == 0 || g_strcmp0(level, "*") == 0)
return MSGLEVEL_ALL;
if (g_ascii_strcasecmp(level, "NEVER") == 0)
@@ -177,7 +177,7 @@ int combine_level(int dest, const char *src)
itemname = *item + (**item == '+' || **item == '-' ? 1 : 0);
itemlevel = level_get(itemname);
- if (strcmp(itemname, "NONE") == 0)
+ if (g_strcmp0(itemname, "NONE") == 0)
dest = 0;
else if (**item == '-')
dest &= ~(itemlevel);