mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +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:
@@ -421,6 +421,7 @@ irc_protocol_parse_time (const char *time)
|
||||
pos = strchr (time2, ',');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
error = NULL;
|
||||
value = strtol (time2, &error, 10);
|
||||
if (error && !error[0] && (value >= 0))
|
||||
time_value = (int)value;
|
||||
|
||||
Reference in New Issue
Block a user