mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 00:52:30 +02:00
Simplify itemcmp.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4656 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
dc8e204bd9
commit
519b8f1b8d
1 changed files with 2 additions and 4 deletions
|
|
@ -250,11 +250,9 @@ static int itemcmp(const char *patt, const char *item)
|
||||||
{
|
{
|
||||||
/* returns 0 on match, nonzero otherwise */
|
/* returns 0 on match, nonzero otherwise */
|
||||||
|
|
||||||
if (item == NULL)
|
if (!strcmp(patt, "*"))
|
||||||
return g_strcasecmp(patt, "*") != 0;
|
|
||||||
if (*patt == '*')
|
|
||||||
return 0;
|
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,
|
LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue