mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
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
This commit is contained in:
parent
9ffe52ec5e
commit
f14199d9c1
57 changed files with 170 additions and 170 deletions
|
|
@ -168,7 +168,7 @@ static HILIGHT_REC *hilight_find(const char *text, char **channels)
|
|||
if ((channels == NULL && rec->channels == NULL))
|
||||
return rec; /* no channels - ok */
|
||||
|
||||
if (channels != NULL && strcmp(*channels, "*") == 0)
|
||||
if (channels != NULL && g_strcmp0(*channels, "*") == 0)
|
||||
return rec; /* ignore channels */
|
||||
|
||||
if (channels == NULL || rec->channels == NULL)
|
||||
|
|
@ -306,7 +306,7 @@ void hilight_update_text_dest(TEXT_DEST_REC *dest, HILIGHT_REC *rec)
|
|||
dest->hilight_priority = rec->priority;
|
||||
|
||||
g_free_and_null(dest->hilight_color);
|
||||
if (rec->act_color != NULL && strcmp(rec->act_color, "%n") == 0)
|
||||
if (rec->act_color != NULL && g_strcmp0(rec->act_color, "%n") == 0)
|
||||
dest->level |= MSGLEVEL_NO_ACT;
|
||||
else
|
||||
dest->hilight_color = hilight_get_act_color(rec);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue