1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 14:56:39 +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
@@ -625,6 +625,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
ptr_value = (const char *)weechat_hashtable_get (values, "max-bytes");
if (ptr_value)
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0])
server->multiline_max_bytes = number;
@@ -633,6 +634,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
ptr_value = (const char *)weechat_hashtable_get (values, "max-lines");
if (ptr_value)
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0])
server->multiline_max_lines = number;