summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-01-06 20:02:31 +0100
committerGitHub <noreply@github.com>2018-01-06 20:02:31 +0100
commit4d5982f07d7f32585c00f1d6cca3fb425183140f (patch)
tree5142c07894bc6f59aae5aa0af2f63c68ab609285 /src/fe-common
parent60c31219a278330498e695e4d7fca05ea69962e4 (diff)
downloadirssi-4d5982f07d7f32585c00f1d6cca3fb425183140f.zip
Update fe-common-core.c
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/fe-common-core.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c
index bce9ab4e..4f2d210a 100644
--- a/src/fe-common/core/fe-common-core.c
+++ b/src/fe-common/core/fe-common-core.c
@@ -475,26 +475,29 @@ gboolean strarray_find_dest(char **array, const TEXT_DEST_REC *dest)
return FALSE;
}
- int server_tag_len = dest->server_tag ? strlen(dest->server_tag) : 0;
+ int server_tag_len = dest->server_tag != NULL ? strlen(dest->server_tag) : 0;
for (tmp = array; *tmp != NULL; tmp++) {
char *str = *tmp;
if (*str == '\0') {
continue;
}
- if (server_tag_len && !g_ascii_strncasecmp(str, dest->server_tag, server_tag_len) && str[server_tag_len] == '/') {
+ if (server_tag_len &&
+ g_ascii_strncasecmp(str, dest->server_tag, server_tag_len) == 0 &&
+ str[server_tag_len] == '/') {
str += server_tag_len + 1;
}
- if (!g_strcmp0(str, "") || !g_strcmp0(str, "::all")) {
+ if (g_strcmp0(str, "") == 0 || g_strcmp0(str, "::all") == 0) {
return TRUE;
- } else if (!g_ascii_strcasecmp(str, dest->target)) {
+ } else if (g_ascii_strcasecmp(str, dest->target) == 0) {
return TRUE;
} else if (item->type == query_type &&
- !g_strcmp0(str, (dest->target[0] == '=') ? "::dccqueries" : "::queries")) {
+ g_strcmp0(str, dest->target[0] == '=' ? "::dccqueries" :
+ "::queries") == 0) {
return TRUE;
} else if (item->type == channel_type &&
- !g_strcmp0(str, "::channels")) {
+ g_strcmp0(str, "::channels") == 0) {
return TRUE;
}
}