summaryrefslogtreecommitdiff
path: root/kike.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-08-01 09:22:59 +0200
committerPřemysl Janouch <p@janouch.name>2018-08-01 09:22:59 +0200
commitb9eddabeddb68157a29a5fa5810d8c0dc3680aaa (patch)
tree34c87e86afc860febc10dc0db216dce3700546b1 /kike.c
parent50ed74a740d8e9be5948f9f11fb1a720c83dd38c (diff)
downloadxK-b9eddabeddb68157a29a5fa5810d8c0dc3680aaa.tar.gz
xK-b9eddabeddb68157a29a5fa5810d8c0dc3680aaa.tar.xz
xK-b9eddabeddb68157a29a5fa5810d8c0dc3680aaa.zip
kike: explicit conversion from pointer to boolean
In practice the values in the map may only be 1 or 0, so it doesn't matter, but in C it is better to be safe than sorry.
Diffstat (limited to 'kike.c')
-rw-r--r--kike.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kike.c b/kike.c
index 68bcdcd..dfabc9c 100644
--- a/kike.c
+++ b/kike.c
@@ -2728,7 +2728,7 @@ irc_try_join (struct client *c, const char *channel_name, const char *key)
else if (channel_get_user (chan, c))
return;
- bool invited_by_chanop = str_map_find (&c->invites, channel_name);
+ bool invited_by_chanop = !!str_map_find (&c->invites, channel_name);
if ((chan->modes & IRC_CHAN_MODE_INVITE_ONLY)
&& !client_in_mask_list (c, &chan->invite_list)
&& !invited_by_chanop)