mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 21:00:40 +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
|
|
@ -129,7 +129,7 @@ STATUSBAR_GROUP_REC *statusbar_group_find(const char *name)
|
|||
for (tmp = statusbar_groups; tmp != NULL; tmp = tmp->next) {
|
||||
STATUSBAR_GROUP_REC *rec = tmp->data;
|
||||
|
||||
if (strcmp(rec->name, name) == 0)
|
||||
if (g_strcmp0(rec->name, name) == 0)
|
||||
return rec;
|
||||
}
|
||||
|
||||
|
|
@ -617,7 +617,7 @@ STATUSBAR_REC *statusbar_find(STATUSBAR_GROUP_REC *group, const char *name,
|
|||
STATUSBAR_REC *rec = tmp->data;
|
||||
|
||||
if (rec->parent_window == window &&
|
||||
strcmp(rec->config->name, name) == 0)
|
||||
g_strcmp0(rec->config->name, name) == 0)
|
||||
return rec;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue