1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 10:13:12 +02:00

irc: replace calls to strndup by weechat_strndup

This commit is contained in:
Sébastien Helleu
2022-02-19 16:34:36 +01:00
parent 4068dc8da5
commit f39c6a58d0
+6 -6
View File
@@ -891,8 +891,8 @@ IRC_PROTOCOL_CALLBACK(cap)
pos_value = strstr (caps_supported[j], "=");
if (pos_value)
{
str_name = strndup (caps_supported[j],
pos_value - caps_supported[j]);
str_name = weechat_strndup (caps_supported[j],
pos_value - caps_supported[j]);
if (str_name)
{
weechat_hashtable_set (server->cap_ls,
@@ -971,8 +971,8 @@ IRC_PROTOCOL_CALLBACK(cap)
pos_value = strstr (caps_enabled[j], "=");
if (pos_value)
{
str_name = strndup (caps_enabled[j],
pos_value - caps_enabled[j]);
str_name = weechat_strndup (caps_enabled[j],
pos_value - caps_enabled[j]);
if (str_name)
{
weechat_hashtable_set (server->cap_list,
@@ -1152,8 +1152,8 @@ IRC_PROTOCOL_CALLBACK(cap)
pos_value = strstr (caps_added[j], "=");
if (pos_value)
{
str_name = strndup (caps_added[j],
pos_value - caps_added[j]);
str_name = weechat_strndup (caps_added[j],
pos_value - caps_added[j]);
if (str_name)
{
weechat_hashtable_set (server->cap_ls,