aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipf/libipf/parsewhoisline.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-01-04 02:49:18 +0000
committerCy Schubert <cy@FreeBSD.org>2022-01-04 03:37:25 +0000
commit44bc30192139b0b3c95510ab3b35802bcc6d63e4 (patch)
tree9227075f05eaecdc77ed07a1c2a0c45c727434ab /sbin/ipf/libipf/parsewhoisline.c
parent701301511f0ca044fc71470ed7842cd2c6fee001 (diff)
downloadsrc-44bc30192139b0b3c95510ab3b35802bcc6d63e4.tar.gz
src-44bc30192139b0b3c95510ab3b35802bcc6d63e4.zip
ipfilter userland: Style(9) requires a space after return
Reported by: jrtc27 Fixes: 2582ae5740181e0d2bab10003d66ae91c9b56329 MFC after: 1 month
Diffstat (limited to 'sbin/ipf/libipf/parsewhoisline.c')
-rw-r--r--sbin/ipf/libipf/parsewhoisline.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sbin/ipf/libipf/parsewhoisline.c b/sbin/ipf/libipf/parsewhoisline.c
index ddcb8677cc1c..529372f91fe2 100644
--- a/sbin/ipf/libipf/parsewhoisline.c
+++ b/sbin/ipf/libipf/parsewhoisline.c
@@ -19,7 +19,7 @@ parsewhoisline(char *line, addrfamily_t *addrp, addrfamily_t *maskp)
char *s = NULL;
if (line == NULL)
- return(-1);
+ return (-1);
while (*src != '\0') {
s = strchr(src, '(');
@@ -33,7 +33,7 @@ parsewhoisline(char *line, addrfamily_t *addrp, addrfamily_t *maskp)
}
if (s == NULL)
- return(-1);
+ return (-1);
memset(addrp, 0x00, sizeof(*maskp));
memset(maskp, 0x00, sizeof(*maskp));
@@ -44,20 +44,20 @@ parsewhoisline(char *line, addrfamily_t *addrp, addrfamily_t *maskp)
s = strchr(s, ')');
if (s == NULL || *++s != ' ')
- return(-1);
+ return (-1);
/*
* Parse the IPv6
*/
if (inet_pton(AF_INET6, s, &a61.in6) != 1)
- return(-1);
+ return (-1);
s = strchr(s, ' ');
if (s == NULL || strncmp(s, " - ", 3))
- return(-1);
+ return (-1);
s += 3;
if (inet_pton(AF_INET6, s, &a62) != 1)
- return(-1);
+ return (-1);
addrp->adf_addr = a61;
addrp->adf_family = AF_INET6;
@@ -74,37 +74,37 @@ parsewhoisline(char *line, addrfamily_t *addrp, addrfamily_t *maskp)
* then we can't add it into a pool.
*/
if (count6bits(maskp->adf_addr.i6) == -1)
- return(-1);
+ return (-1);
maskp->adf_family = AF_INET6;
maskp->adf_len = addrp->adf_len;
if (IP6_MASKNEQ(&addrp->adf_addr.in6, &maskp->adf_addr.in6,
&addrp->adf_addr.in6)) {
- return(-1);
+ return (-1);
}
- return(0);
+ return (0);
#else
- return(-1);
+ return (-1);
#endif
}
s = strchr(s, ')');
if (s == NULL || *++s != ' ')
- return(-1);
+ return (-1);
s++;
if (inet_aton(s, &a1) != 1)
- return(-1);
+ return (-1);
s = strchr(s, ' ');
if (s == NULL || strncmp(s, " - ", 3))
- return(-1);
+ return (-1);
s += 3;
if (inet_aton(s, &a2) != 1)
- return(-1);
+ return (-1);
addrp->adf_addr.in4 = a1;
addrp->adf_family = AF_INET;
@@ -117,13 +117,13 @@ parsewhoisline(char *line, addrfamily_t *addrp, addrfamily_t *maskp)
* we can't add it into a pool.
*/
if (count4bits(maskp->adf_addr.in4.s_addr) == -1)
- return(-1);
+ return (-1);
maskp->adf_family = AF_INET;
maskp->adf_len = addrp->adf_len;
bzero((char *)maskp + maskp->adf_len, sizeof(*maskp) - maskp->adf_len);
if ((addrp->adf_addr.in4.s_addr & maskp->adf_addr.in4.s_addr) !=
addrp->adf_addr.in4.s_addr)
- return(-1);
- return(0);
+ return (-1);
+ return (0);
}