diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/buflist/buflist-mouse.c | 3 | ||||
-rw-r--r-- | src/plugins/irc/irc-list.c | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-message.c | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc-redirect.c | 4 | ||||
-rw-r--r-- | src/plugins/plugin-api-info.c | 2 | ||||
-rw-r--r-- | src/plugins/relay/relay-auth.c | 1 | ||||
-rw-r--r-- | src/plugins/xfer/xfer-network.c | 1 |
8 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/buflist/buflist-mouse.c b/src/plugins/buflist/buflist-mouse.c index d8ade4e80..352e0bd85 100644 --- a/src/plugins/buflist/buflist-mouse.c +++ b/src/plugins/buflist/buflist-mouse.c @@ -62,6 +62,7 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info) ptr_bar_item_line = weechat_hashtable_get (info, "_bar_item_line"); if (!ptr_bar_item_line) goto end; + error = NULL; item_line = strtol (ptr_bar_item_line, &error, 10); if (!error || error[0]) goto end; @@ -250,9 +251,11 @@ buflist_hsignal_cb (const void *pointer, void *data, const char *signal, return WEECHAT_RC_OK; ptr_buffer = (struct t_gui_buffer *)value; + error = NULL; number = strtol (ptr_number, &error, 10); if (!error || error[0]) return WEECHAT_RC_OK; + error = NULL; number2 = strtol (ptr_number2, &error, 10); if (!error || error[0]) return WEECHAT_RC_OK; diff --git a/src/plugins/irc/irc-list.c b/src/plugins/irc/irc-list.c index c4c41ddd2..2d509753c 100644 --- a/src/plugins/irc/irc-list.c +++ b/src/plugins/irc/irc-list.c @@ -281,6 +281,7 @@ irc_list_channel_match_filter (struct t_irc_server *server, else if (strncmp (server->list->filter, "u:>", 3) == 0) { /* filter by users (> N)*/ + error = NULL; number = strtol (server->list->filter + 3, &error, 10); if (error && !error[0] && channel->users > (int)number) return 1; @@ -288,6 +289,7 @@ irc_list_channel_match_filter (struct t_irc_server *server, else if (strncmp (server->list->filter, "u:<", 3) == 0) { /* filter by users (< N)*/ + error = NULL; number = strtol (server->list->filter + 3, &error, 10); if (error && !error[0] && channel->users < (int)number) return 1; @@ -295,6 +297,7 @@ irc_list_channel_match_filter (struct t_irc_server *server, else if (strncmp (server->list->filter, "u:", 2) == 0) { /* filter by users */ + error = NULL; number = strtol (server->list->filter + 2, &error, 10); if (error && !error[0] && channel->users >= (int)number) return 1; @@ -437,6 +440,7 @@ irc_list_parse_messages (struct t_irc_server *server, const char *output) ptr_name++; } channel->name2 = strdup (ptr_name); + error = NULL; number = strtol (params[2], &error, 10); channel->users = (error && !error[0]) ? number : 0; channel->topic = (num_params > 3) ? diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index 4889dc7a1..e85d7b14a 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -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; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 1da7c8cfd..345bcb61d 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -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; diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c index 7102b4819..71aff5cec 100644 --- a/src/plugins/irc/irc-redirect.c +++ b/src/plugins/irc/irc-redirect.c @@ -462,6 +462,7 @@ irc_redirect_new_with_commands (struct t_irc_server *server, if (pos) { pos[0] = '\0'; + error = NULL; value = strtol (pos + 1, &error, 10); if (!error || error[0]) value = -1; @@ -1309,6 +1310,7 @@ irc_redirect_pattern_hsignal_cb (const void *pointer, void *data, timeout = 0; if (str_timeout && str_timeout[0]) { + error = NULL; number = (int)strtol (str_timeout, &error, 10); if (error && !error[0]) timeout = number; @@ -1379,6 +1381,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data, count = 1; if (str_count && str_count[0]) { + error = NULL; number = (int)strtol (str_count, &error, 10); if (error && !error[0]) count = number; @@ -1387,6 +1390,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data, timeout = 0; if (str_timeout && str_timeout[0]) { + error = NULL; number = (int)strtol (str_timeout, &error, 10); if (error && !error[0]) timeout = number; diff --git a/src/plugins/plugin-api-info.c b/src/plugins/plugin-api-info.c index 4d9f07b42..8dc586e2d 100644 --- a/src/plugins/plugin-api-info.c +++ b/src/plugins/plugin-api-info.c @@ -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; diff --git a/src/plugins/relay/relay-auth.c b/src/plugins/relay/relay-auth.c index 57ace728c..110412413 100644 --- a/src/plugins/relay/relay-auth.c +++ b/src/plugins/relay/relay-auth.c @@ -247,6 +247,7 @@ relay_auth_parse_pbkdf2 (const char *parameters, } /* parameter 2: iterations */ + error = NULL; *iterations = (int)strtol (argv[1], &error, 10); if (!error || error[0]) *iterations = 0; 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; |