summaryrefslogtreecommitdiff
path: root/src/plugins/xfer
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-11-01 09:53:38 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-11-01 09:53:38 +0100
commit6d69cde18674105e63b2c85e9a3cd996c8a3a3ea (patch)
tree96734ce2340f1572957133d6b34aa8f8b62e4d68 /src/plugins/xfer
parentf53983bc790b8201431ee18fd5411311df6fabd6 (diff)
downloadweechat-6d69cde18674105e63b2c85e9a3cd996c8a3a3ea.zip
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.
Diffstat (limited to 'src/plugins/xfer')
-rw-r--r--src/plugins/xfer/xfer-network.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/xfer/xfer-network.c b/src/plugins/xfer/xfer-network.c
index 9eeabf904..8eac448d5 100644
--- a/src/plugins/xfer/xfer-network.c
+++ b/src/plugins/xfer/xfer-network.c
@@ -63,6 +63,7 @@ xfer_network_convert_integer_to_ipv4 (const char *str_address)
if (!str_address || !str_address[0])
return NULL;
+ error = NULL;
number = strtoll (str_address, &error, 10);
if (!error || error[0] || (number <= 0) || (number > UINT32_MAX))
return NULL;