mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Replace strocpy with g_strlcpy
The only difference was that the former returned 1 if the buffer was overflown, but the return value was never checked.
This commit is contained in:
parent
8289f36075
commit
72712a0c62
4 changed files with 4 additions and 21 deletions
|
|
@ -48,7 +48,7 @@ NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
|
|||
rec->send_massjoin = send_massjoin;
|
||||
|
||||
if (prefixes != NULL) {
|
||||
strocpy(rec->prefixes, prefixes, sizeof(rec->prefixes));
|
||||
g_strlcpy(rec->prefixes, prefixes, sizeof(rec->prefixes));
|
||||
}
|
||||
|
||||
nicklist_insert(CHANNEL(channel), rec);
|
||||
|
|
|
|||
|
|
@ -473,8 +473,8 @@ static void ctcp_msg_dcc_send(IRC_SERVER_REC *server, const char *data,
|
|||
net_ip2host(&temp_dcc->addr, temp_dcc->addrstr);
|
||||
else {
|
||||
/* with IPv6, show it to us as it was sent */
|
||||
strocpy(temp_dcc->addrstr, address,
|
||||
sizeof(temp_dcc->addrstr));
|
||||
g_strlcpy(temp_dcc->addrstr, address,
|
||||
sizeof(temp_dcc->addrstr));
|
||||
}
|
||||
|
||||
/* This new signal is added to let us invoke
|
||||
|
|
@ -508,7 +508,7 @@ static void ctcp_msg_dcc_send(IRC_SERVER_REC *server, const char *data,
|
|||
net_ip2host(&dcc->addr, dcc->addrstr);
|
||||
else {
|
||||
/* with IPv6, show it to us as it was sent */
|
||||
strocpy(dcc->addrstr, address, sizeof(dcc->addrstr));
|
||||
g_strlcpy(dcc->addrstr, address, sizeof(dcc->addrstr));
|
||||
}
|
||||
dcc->port = port;
|
||||
dcc->size = size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue