1
0
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:
Sébastien Helleu
2023-11-01 09:53:38 +01:00
parent f53983bc79
commit 6d69cde186
15 changed files with 40 additions and 0 deletions
+1
View File
@@ -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;