mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 16:12:30 +02:00
Change all strcmp() to g_strcmp0() to handle nulls gracefully
Just a string replacement (but i did check every one of them)
sed -i 's/strcmp(/g_strcmp0(/g' **/*.c
This commit is contained in:
parent
9ffe52ec5e
commit
f14199d9c1
57 changed files with 170 additions and 170 deletions
|
|
@ -191,7 +191,7 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
|||
return;
|
||||
|
||||
/* handle only DCC messages */
|
||||
if (strcmp(target, "*") == 0)
|
||||
if (g_strcmp0(target, "*") == 0)
|
||||
dcc = item_get_dcc(item);
|
||||
else if (*target == '=')
|
||||
dcc = dcc_chat_find_id(target+1);
|
||||
|
|
@ -625,7 +625,7 @@ static void ctcp_msg_dcc_chat(IRC_SERVER_REC *server, const char *data,
|
|||
g_strfreev(params);
|
||||
return;
|
||||
}
|
||||
passive = paramcount == 4 && strcmp(params[2], "0") == 0;
|
||||
passive = paramcount == 4 && g_strcmp0(params[2], "0") == 0;
|
||||
|
||||
dcc = DCC_CHAT(dcc_find_request(DCC_CHAT_TYPE, nick, NULL));
|
||||
if (dcc != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue