1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 21:06:38 +02:00

core, plugins: set error to NULL before calling strtol()

This is not strictly necessary, just in case the function strtol() doesn't
update the pointer.
This commit is contained in:
Sébastien Helleu
2023-11-01 09:53:38 +01:00
parent f53983bc79
commit 6d69cde186
15 changed files with 40 additions and 0 deletions
+2
View File
@@ -877,6 +877,7 @@ plugin_api_info_nick_color_ignore_case_cb (const void *pointer, void *data,
case_range = -1;
if (num_items >= 2)
{
error = NULL;
number = strtol (items[1], &error, 10);
if (error && !error[0])
case_range = (int)number;
@@ -916,6 +917,7 @@ plugin_api_info_nick_color_name_ignore_case_cb (const void *pointer, void *data,
case_range = -1;
if (num_items >= 2)
{
error = NULL;
number = strtol (items[1], &error, 10);
if (error && !error[0])
case_range = (int)number;