From 1749a7a5abf9801bb663b74d4b3e7c3bcbfeb271 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Wed, 9 Dec 2015 16:16:03 +0100 Subject: Minor adjustments. Use g_strcmp0 instead of strcmp. Explicit checks added for the g_strcmp0 clauses. --- src/core/channels-setup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/channels-setup.c') diff --git a/src/core/channels-setup.c b/src/core/channels-setup.c index dd722fea..4966d77d 100644 --- a/src/core/channels-setup.c +++ b/src/core/channels-setup.c @@ -37,10 +37,8 @@ static int compare_channel_setup (CONFIG_NODE *node, CHANNEL_SETUP_REC *channel) name = config_node_get_str(node, "name", NULL); chatnet = config_node_get_str(node, "chatnet", NULL); - if (name == NULL || chatnet == NULL) - return 1; - - if (strcmp(name, channel->name) || strcmp(chatnet, channel->chatnet)) + if (g_strcmp0(name, channel->name) != 0 || + g_strcmp0(chatnet, channel->chatnet) != 0) return 1; return 0; -- cgit v1.2.3