mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 07:32:04 +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
|
|
@ -44,7 +44,7 @@ void *module_check_cast_module(void *object, int type_pos,
|
|||
|
||||
str = module_find_id_str(module,
|
||||
G_STRUCT_MEMBER(int, object, type_pos));
|
||||
return str == NULL || strcmp(str, id) != 0 ? NULL : object;
|
||||
return str == NULL || g_strcmp0(str, id) != 0 ? NULL : object;
|
||||
}
|
||||
|
||||
/* return unique number across all modules for `id' */
|
||||
|
|
@ -251,7 +251,7 @@ MODULE_FILE_REC *module_file_find(MODULE_REC *module, const char *name)
|
|||
for (tmp = module->files; tmp != NULL; tmp = tmp->next) {
|
||||
MODULE_FILE_REC *rec = tmp->data;
|
||||
|
||||
if (strcmp(rec->name, name) == 0)
|
||||
if (g_strcmp0(rec->name, name) == 0)
|
||||
return rec;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue