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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user