mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 01:03:14 +02:00
core, plugins: replace calls to strcmp by string_strcmp when difference matters (issue #1872)
This commit is contained in:
@@ -130,7 +130,7 @@ config_file_find_pos (const char *name)
|
||||
for (ptr_config = config_files; ptr_config;
|
||||
ptr_config = ptr_config->next_config)
|
||||
{
|
||||
if (strcmp (name, ptr_config->name) < 0)
|
||||
if (string_strcmp (name, ptr_config->name) < 0)
|
||||
return ptr_config;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ config_file_section_find_pos (struct t_config_file *config_file,
|
||||
for (ptr_section = config_file->sections; ptr_section;
|
||||
ptr_section = ptr_section->next_section)
|
||||
{
|
||||
if (strcmp (name, ptr_section->name) < 0)
|
||||
if (string_strcmp (name, ptr_section->name) < 0)
|
||||
return ptr_section;
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ config_file_option_find_pos (struct t_config_section *section, const char *name)
|
||||
for (ptr_option = section->last_option; ptr_option;
|
||||
ptr_option = ptr_option->prev_option)
|
||||
{
|
||||
if (strcmp (name, ptr_option->name) >= 0)
|
||||
if (string_strcmp (name, ptr_option->name) >= 0)
|
||||
return ptr_option->next_option;
|
||||
}
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ gui_filter_find_pos (struct t_gui_filter *filter)
|
||||
for (ptr_filter = gui_filters; ptr_filter;
|
||||
ptr_filter = ptr_filter->next_filter)
|
||||
{
|
||||
if (strcmp (filter->name, ptr_filter->name) < 0)
|
||||
if (string_strcmp (filter->name, ptr_filter->name) < 0)
|
||||
return ptr_filter;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -390,7 +390,7 @@ gui_key_find_pos (struct t_gui_key *keys, struct t_gui_key *key)
|
||||
{
|
||||
if ((key->score < ptr_key->score)
|
||||
|| ((key->score == ptr_key->score)
|
||||
&& (strcmp (key->key, ptr_key->key) < 0)))
|
||||
&& (string_strcmp (key->key, ptr_key->key) < 0)))
|
||||
{
|
||||
return ptr_key;
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ alias_find_pos (const char *name)
|
||||
|
||||
for (ptr_alias = alias_list; ptr_alias; ptr_alias = ptr_alias->next_alias)
|
||||
{
|
||||
if (strcmp (name, ptr_alias->name) < 0)
|
||||
if (weechat_strcmp (name, ptr_alias->name) < 0)
|
||||
return ptr_alias;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user