summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-03-17 21:16:33 -0400
committerGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-03-18 01:56:10 -0400
commit16ed769a51c69ae99123d3e64d1f914bd20d7cb8 (patch)
tree399e6c4be416a9ed3d3088c54c450d2904eba6b8
parenta48880c2b45e31ace09e037b1567f98f7ba4be9f (diff)
acl_files: always return a value from add_host
If it's going to return a value, it needs to always return a value.
-rw-r--r--server/acl_files.c6
1 files 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)