From 16ed769a51c69ae99123d3e64d1f914bd20d7cb8 Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Sun, 17 Mar 2013 21:16:33 -0400 Subject: acl_files: always return a value from add_host If it's going to return a value, it needs to always return a value. --- server/acl_files.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/acl_files.c b/server/acl_files.c index 4e35233..a2da446 100644 --- a/server/acl_files.c +++ b/server/acl_files.c @@ -66,10 +66,10 @@ add_host(struct host_ace **list, if (m) { *(m++) = 0; if (!*m) - return; + return EINVAL; i = strtol(m, &x, 10); if (*x || i < 0 || i > 32) - return; + return EINVAL; while (i--) mask = (mask >> 1) | 0x80000000; } else { @@ -77,7 +77,7 @@ add_host(struct host_ace **list, } if (!inet_aton(buf, &addr)) - return; + return EINVAL; e = (struct host_ace *)malloc(sizeof(struct host_ace)); if (e == NULL) -- cgit v1.2.3