mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +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
|
|
@ -398,7 +398,7 @@ void parse_channel_modes(IRC_CHANNEL_REC *channel, const char *setby,
|
|||
old_key = NULL;
|
||||
}
|
||||
|
||||
if (strcmp(newmode->str, channel->mode) != 0) {
|
||||
if (g_strcmp0(newmode->str, channel->mode) != 0) {
|
||||
g_free(channel->mode);
|
||||
channel->mode = g_strdup(newmode->str);
|
||||
|
||||
|
|
@ -842,7 +842,7 @@ static void cmd_mode(const char *data, IRC_SERVER_REC *server,
|
|||
return;
|
||||
}
|
||||
|
||||
if (strcmp(target, "*") == 0) {
|
||||
if (g_strcmp0(target, "*") == 0) {
|
||||
if (!IS_IRC_CHANNEL(channel))
|
||||
cmd_param_error(CMDERR_NOT_JOINED);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue