summaryrefslogtreecommitdiff
path: root/src/s_gline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/s_gline.c')
-rw-r--r--src/s_gline.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/s_gline.c b/src/s_gline.c
index 3d563be..ef30c87 100644
--- a/src/s_gline.c
+++ b/src/s_gline.c
@@ -45,27 +45,25 @@ static void expire_pending_glines(struct gline_pending *);
struct MaskItem *
find_is_glined(const char *host, const char *user)
{
- struct irc_ssaddr iphost, *piphost;
+ struct irc_ssaddr iphost, *piphost = NULL;
struct MaskItem *conf = NULL;
- int t;
+ int t = 0;
+ int aftype = 0;
- if ((t = parse_netmask(host, &iphost, &t)) != HM_HOST)
+ if ((t = parse_netmask(host, &iphost, NULL)) != HM_HOST)
{
#ifdef IPV6
if (t == HM_IPV6)
- t = AF_INET6;
+ aftype = AF_INET6;
else
#endif
- t = AF_INET;
+ aftype = AF_INET;
piphost = &iphost;
}
else
- {
- t = 0;
piphost = NULL;
- }
- conf = find_conf_by_address(host, piphost, CONF_GLINE, t, user, NULL, 0);
+ conf = find_conf_by_address(host, piphost, CONF_GLINE, aftype, user, NULL, 0);
return conf;
}