mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +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
|
|
@ -184,7 +184,7 @@ int strarray_find(char **array, const char *item)
|
|||
GSList *gslist_find_string(GSList *list, const char *key)
|
||||
{
|
||||
for (; list != NULL; list = list->next)
|
||||
if (strcmp(list->data, key) == 0) return list;
|
||||
if (g_strcmp0(list->data, key) == 0) return list;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ GSList *hashtable_get_keys(GHashTable *hash)
|
|||
GList *glist_find_string(GList *list, const char *key)
|
||||
{
|
||||
for (; list != NULL; list = list->next)
|
||||
if (strcmp(list->data, key) == 0) return list;
|
||||
if (g_strcmp0(list->data, key) == 0) return list;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue