diff options
author | dequis <dx@dxzone.com.ar> | 2015-04-07 22:39:05 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-04-07 22:41:05 -0300 |
commit | f14199d9c15a8062b5663fa6fcdae00390473b15 (patch) | |
tree | 730f9fdb49b2e1f26dd56422f83e6b6ab9867d8a /src/irc/core/irc-queries.c | |
parent | 9ffe52ec5e3f0643e7ddd12f4d21c0788d2f8cea (diff) | |
download | irssi-f14199d9c15a8062b5663fa6fcdae00390473b15.zip |
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
Diffstat (limited to 'src/irc/core/irc-queries.c')
-rw-r--r-- | src/irc/core/irc-queries.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/irc/core/irc-queries.c b/src/irc/core/irc-queries.c index ac1a72a1..72c17df1 100644 --- a/src/irc/core/irc-queries.c +++ b/src/irc/core/irc-queries.c @@ -67,13 +67,13 @@ static void check_query_changes(IRC_SERVER_REC *server, const char *nick, if (query == NULL) return; - if (strcmp(query->name, nick) != 0) { + if (g_strcmp0(query->name, nick) != 0) { /* upper/lowercase chars in nick changed */ query_change_nick(query, nick); } if (address != NULL && (query->address == NULL || - strcmp(query->address, address) != 0)) { + g_strcmp0(query->address, address) != 0)) { /* host changed */ query_change_address(query, address); } @@ -109,7 +109,7 @@ static void event_nick(SERVER_REC *server, const char *data, query = query_find(server, orignick); if (query != NULL) { params = event_get_params(data, 1, &nick); - if (strcmp(query->name, nick) != 0) + if (g_strcmp0(query->name, nick) != 0) query_change_nick(query, nick); g_free(params); } |