diff options
author | Michele Marchetto <michele@cvs.openbsd.org> | 2007-01-08 18:09:25 +0000 |
---|---|---|
committer | Michele Marchetto <michele@cvs.openbsd.org> | 2007-01-08 18:09:25 +0000 |
commit | 06c717d0ecd9153ae81180b3bb90421696e1d61d (patch) | |
tree | 7206b9ecf805e9067e2b3d13121647b90442e277 /sys | |
parent | a8f8af6fb70a0295f023ec4cf669ec4df7ef5b9a (diff) |
add round brackets around return values
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_gif.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index fbca691a453..1a10f648e35 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.38 2006/12/28 20:06:11 deraadt Exp $ */ +/* $OpenBSD: if_gif.c,v 1.39 2007/01/08 18:09:24 michele Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -258,7 +258,7 @@ gif_output(ifp, m, dst, rt) end: if (error) ifp->if_oerrors++; - return error; + return (error); } int @@ -328,45 +328,45 @@ gif_ioctl(ifp, cmd, data) &(((struct if_laddrreq *)data)->dstaddr); break; default: - return EINVAL; + return (EINVAL); } /* sa_family must be equal */ if (src->sa_family != dst->sa_family) - return EINVAL; + return (EINVAL); /* validate sa_len */ switch (src->sa_family) { #ifdef INET case AF_INET: if (src->sa_len != sizeof(struct sockaddr_in)) - return EINVAL; + return (EINVAL); break; #endif #ifdef INET6 case AF_INET6: if (src->sa_len != sizeof(struct sockaddr_in6)) - return EINVAL; + return (EINVAL); break; #endif default: - return EAFNOSUPPORT; + return (EAFNOSUPPORT); } switch (dst->sa_family) { #ifdef INET case AF_INET: if (dst->sa_len != sizeof(struct sockaddr_in)) - return EINVAL; + return (EINVAL); break; #endif #ifdef INET6 case AF_INET6: if (dst->sa_len != sizeof(struct sockaddr_in6)) - return EINVAL; + return (EINVAL); break; #endif default: - return EAFNOSUPPORT; + return (EAFNOSUPPORT); } /* check sa_family looks sane for the cmd */ @@ -374,12 +374,12 @@ gif_ioctl(ifp, cmd, data) case SIOCSIFPHYADDR: if (src->sa_family == AF_INET) break; - return EAFNOSUPPORT; + return (EAFNOSUPPORT); #ifdef INET6 case SIOCSIFPHYADDR_IN6: if (src->sa_family == AF_INET6) break; - return EAFNOSUPPORT; + return (EAFNOSUPPORT); #endif /* INET6 */ case SIOCSLIFPHYADDR: /* checks done in the above */ @@ -486,7 +486,7 @@ gif_ioctl(ifp, cmd, data) goto bad; } if (src->sa_len > size) - return EINVAL; + return (EINVAL); bcopy((caddr_t)src, (caddr_t)dst, src->sa_len); break; @@ -518,7 +518,7 @@ gif_ioctl(ifp, cmd, data) goto bad; } if (src->sa_len > size) - return EINVAL; + return (EINVAL); bcopy((caddr_t)src, (caddr_t)dst, src->sa_len); break; @@ -534,7 +534,7 @@ gif_ioctl(ifp, cmd, data) &(((struct if_laddrreq *)data)->addr); size = sizeof(((struct if_laddrreq *)data)->addr); if (src->sa_len > size) - return EINVAL; + return (EINVAL); bcopy((caddr_t)src, (caddr_t)dst, src->sa_len); /* copy dst */ @@ -543,7 +543,7 @@ gif_ioctl(ifp, cmd, data) &(((struct if_laddrreq *)data)->dstaddr); size = sizeof(((struct if_laddrreq *)data)->dstaddr); if (src->sa_len > size) - return EINVAL; + return (EINVAL); bcopy((caddr_t)src, (caddr_t)dst, src->sa_len); break; @@ -563,5 +563,5 @@ gif_ioctl(ifp, cmd, data) break; } bad: - return error; + return (error); } |