summaryrefslogtreecommitdiff
path: root/src/core/log.c
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2007-12-05 23:36:33 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-12-05 23:36:33 +0000
commit519b8f1b8db05b070fa7c66e1b23f79672d83e00 (patch)
treea44bd05d4701f10af1cf703f306b86001343277e /src/core/log.c
parentdc8e204bd9b54a96e37aa931027bd7f0a1160ce0 (diff)
downloadirssi-519b8f1b8db05b070fa7c66e1b23f79672d83e00.zip
Simplify itemcmp.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4656 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/log.c')
-rw-r--r--src/core/log.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/log.c b/src/core/log.c
index cbbe701b..fb035c3b 100644
--- a/src/core/log.c
+++ b/src/core/log.c
@@ -250,11 +250,9 @@ static int itemcmp(const char *patt, const char *item)
{
/* returns 0 on match, nonzero otherwise */
- if (item == NULL)
- return g_strcasecmp(patt, "*") != 0;
- if (*patt == '*')
+ if (!strcmp(patt, "*"))
return 0;
- return g_strcasecmp(patt, item);
+ return item ? g_strcasecmp(patt, item) : 1;
}
LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,