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:
dequis 2015-04-07 22:39:05 -03:00
commit f14199d9c1
57 changed files with 170 additions and 170 deletions

View file

@ -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);