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
|
|
@ -95,7 +95,7 @@ statusbar_config_find(STATUSBAR_GROUP_REC *group, const char *name)
|
|||
for (tmp = group->config_bars; tmp != NULL; tmp = tmp->next) {
|
||||
STATUSBAR_CONFIG_REC *config = tmp->data;
|
||||
|
||||
if (strcmp(config->name, name) == 0)
|
||||
if (g_strcmp0(config->name, name) == 0)
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ static void statusbar_read_item(STATUSBAR_CONFIG_REC *bar, CONFIG_NODE *node)
|
|||
int priority, right_alignment;
|
||||
|
||||
priority = config_node_get_int(node, "priority", 0);
|
||||
right_alignment = strcmp(config_node_get_str(node, "alignment", ""), "right") == 0;
|
||||
right_alignment = g_strcmp0(config_node_get_str(node, "alignment", ""), "right") == 0;
|
||||
statusbar_item_config_create(bar, node->key,
|
||||
priority, right_alignment);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue