summaryrefslogtreecommitdiff
path: root/src/irc/dcc/dcc.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@0x90.dk>2015-04-17 21:13:18 +0200
committerAlexander Færøy <ahf@0x90.dk>2015-04-17 21:13:18 +0200
commit03be2861dcec9e8d088be6a0cae2848388923dab (patch)
tree2355318b525a4bbae3c1651ab37f89901500b2ab /src/irc/dcc/dcc.c
parentef5ac430c75a3a551991aff8dae08ceeaca25d3f (diff)
parent9890daca797b31d34d97d953c512378aabe3d51f (diff)
downloadirssi-03be2861dcec9e8d088be6a0cae2848388923dab.zip
Merge pull request #235 from dequis/g_strcmp0
Change all strcmp() to g_strcmp0() to handle nulls gracefully
Diffstat (limited to 'src/irc/dcc/dcc.c')
-rw-r--r--src/irc/dcc/dcc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c
index 6f0d5c81..17f6c477 100644
--- a/src/irc/dcc/dcc.c
+++ b/src/irc/dcc/dcc.c
@@ -149,7 +149,7 @@ DCC_REC *dcc_find_request(int type, const char *nick, const char *arg)
if (dcc->type == type && !dcc_is_connected(dcc) &&
g_ascii_strcasecmp(dcc->nick, nick) == 0 &&
- (arg == NULL || strcmp(dcc->arg, arg) == 0))
+ (arg == NULL || g_strcmp0(dcc->arg, arg) == 0))
return dcc;
}
@@ -516,7 +516,7 @@ static void cmd_dcc_close(char *data, IRC_SERVER_REC *server)
next = tmp->next;
if (dcc->type == type && g_ascii_strcasecmp(dcc->nick, nick) == 0 &&
- (*arg == '\0' || strcmp(dcc->arg, arg) == 0)) {
+ (*arg == '\0' || g_strcmp0(dcc->arg, arg) == 0)) {
dcc_reject(dcc, server);
found = TRUE;
}