Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Remove parentheses in return statements. No func...
details: https://anonhg.NetBSD.org/src/rev/af7ffc73b57d
branches: trunk
changeset: 359341:af7ffc73b57d
user: maxv <maxv%NetBSD.org@localhost>
date: Wed Feb 07 12:09:55 2018 +0000
description:
Remove parentheses in return statements. No functional change.
diffstat:
sys/netinet/ip_mroute.c | 92 ++++++++++++++++++++++++------------------------
1 files changed, 46 insertions(+), 46 deletions(-)
diffs (truncated from 362 to 300 lines):
diff -r b131c609b568 -r af7ffc73b57d sys/netinet/ip_mroute.c
--- a/sys/netinet/ip_mroute.c Wed Feb 07 12:04:50 2018 +0000
+++ b/sys/netinet/ip_mroute.c Wed Feb 07 12:09:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_mroute.c,v 1.150 2018/02/07 12:04:50 maxv Exp $ */
+/* $NetBSD: ip_mroute.c,v 1.151 2018/02/07 12:09:55 maxv Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -93,7 +93,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.150 2018/02/07 12:04:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.151 2018/02/07 12:09:55 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -678,7 +678,7 @@
if (mrtdebug)
log(LOG_DEBUG, "ip_mrouter_done\n");
- return (0);
+ return 0;
}
void
@@ -714,7 +714,7 @@
set_assert(int i)
{
pim_assert = !!i;
- return (0);
+ return 0;
}
/*
@@ -735,18 +735,18 @@
*/
error = sockopt_get(sopt, &apival, sizeof(apival));
if (error)
- return (error);
+ return error;
if (numvifs > 0)
- return (EPERM);
+ return EPERM;
if (pim_assert)
- return (EPERM);
+ return EPERM;
for (i = 0; i < MFCTBLSIZ; i++) {
if (LIST_FIRST(&mfchashtbl[i]) != NULL)
- return (EPERM);
+ return EPERM;
}
mrt_api_config = apival & mrt_api_support;
- return (0);
+ return 0;
}
/*
@@ -761,13 +761,13 @@
struct sockaddr_in sin;
if (vifcp->vifc_vifi >= MAXVIFS)
- return (EINVAL);
+ return EINVAL;
if (in_nullhost(vifcp->vifc_lcl_addr))
- return (EADDRNOTAVAIL);
+ return EADDRNOTAVAIL;
vifp = &viftable[vifcp->vifc_vifi];
if (!in_nullhost(vifp->v_lcl_addr))
- return (EADDRINUSE);
+ return EADDRINUSE;
/* Find the interface with an address in AF_INET family. */
#ifdef PIM
@@ -798,7 +798,7 @@
if (vifcp->vifc_flags & VIFF_TUNNEL) {
if (vifcp->vifc_flags & VIFF_SRCRT) {
log(LOG_ERR, "source routed tunnels not supported\n");
- return (EOPNOTSUPP);
+ return EOPNOTSUPP;
}
/* attach this vif to decapsulator dispatch table */
@@ -816,7 +816,7 @@
vif_encapcheck, &vif_encapsw, vifp);
encap_lock_exit();
if (!vifp->v_encap_cookie)
- return (EINVAL);
+ return EINVAL;
/* Create a fake encapsulation interface. */
ifp = malloc(sizeof(*ifp), M_MRTABLE, M_WAITOK|M_ZERO);
@@ -843,13 +843,13 @@
} else {
/* Make sure the interface supports multicast. */
if ((ifp->if_flags & IFF_MULTICAST) == 0)
- return (EOPNOTSUPP);
+ return EOPNOTSUPP;
/* Enable promiscuous reception of all IP multicasts. */
sockaddr_in_init(&sin, &zeroin_addr, 0);
error = if_mcast_op(ifp, SIOCADDMULTI, sintosa(&sin));
if (error)
- return (error);
+ return error;
}
s = splsoftnet();
@@ -892,7 +892,7 @@
vifcp->vifc_threshold,
vifcp->vifc_rate_limit);
- return (0);
+ return 0;
}
void
@@ -943,11 +943,11 @@
int s;
if (*vifip >= numvifs)
- return (EINVAL);
+ return EINVAL;
vifp = &viftable[*vifip];
if (in_nullhost(vifp->v_lcl_addr))
- return (EADDRNOTAVAIL);
+ return EADDRNOTAVAIL;
s = splsoftnet();
@@ -964,7 +964,7 @@
if (mrtdebug)
log(LOG_DEBUG, "del_vif %d, numvifs %d\n", *vifip, numvifs);
- return (0);
+ return 0;
}
/*
@@ -1050,7 +1050,7 @@
error = sockopt_get(sopt, mfccp, sizeof(struct mfcctl));
if (error)
- return (error);
+ return error;
s = splsoftnet();
rt = mfc_find(&mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp);
@@ -1066,7 +1066,7 @@
update_mfc_params(rt, mfccp);
splx(s);
- return (0);
+ return 0;
}
/*
@@ -1141,7 +1141,7 @@
M_NOWAIT);
if (rt == NULL) {
splx(s);
- return (ENOBUFS);
+ return ENOBUFS;
}
init_mfc_params(rt, mfccp);
@@ -1155,7 +1155,7 @@
}
splx(s);
- return (0);
+ return 0;
}
#ifdef UPCALL_TIMING
@@ -1208,7 +1208,7 @@
/* Try with the size of mfcctl2. */
error = sockopt_get(sopt, mfccp, sizeof(struct mfcctl2));
if (error)
- return (error);
+ return error;
}
if (mrtdebug & DEBUG_MFC)
@@ -1221,7 +1221,7 @@
rt = mfc_find(&mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp);
if (rt == NULL) {
splx(s);
- return (EADDRNOTAVAIL);
+ return EADDRNOTAVAIL;
}
/*
@@ -1234,7 +1234,7 @@
free(rt, M_MRTABLE);
splx(s);
- return (0);
+ return 0;
}
static int
@@ -1243,11 +1243,11 @@
if (s) {
if (sbappendaddr(&s->so_rcv, sintosa(src), mm, NULL) != 0) {
sorwakeup(s);
- return (0);
+ return 0;
}
}
m_freem(mm);
- return (-1);
+ return -1;
}
/*
@@ -1295,7 +1295,7 @@
"ip_mforward: received source-routed packet from %x\n",
ntohl(ip->ip_src.s_addr));
- return (1);
+ return 1;
}
/*
@@ -1308,7 +1308,7 @@
* or a packet destined to a local-only group.
*/
if (ip->ip_ttl <= 1 || IN_LOCAL_GROUP(ip->ip_dst.s_addr))
- return (0);
+ return 0;
/*
* Determine forwarding vifs from the forwarding cache table
@@ -1320,7 +1320,7 @@
/* Entry exists, so forward if necessary */
if (rt != NULL) {
splx(s);
- return (ip_mdq(m, ifp, rt));
+ return ip_mdq(m, ifp, rt);
} else {
/*
* If we don't have a route for packet's origin,
@@ -1354,14 +1354,14 @@
M_NOWAIT);
if (rte == NULL) {
splx(s);
- return (ENOBUFS);
+ return ENOBUFS;
}
mb0 = m_copypacket(m, M_DONTWAIT);
M_PULLUP(mb0, hlen);
if (mb0 == NULL) {
free(rte, M_MRTABLE);
splx(s);
- return (ENOBUFS);
+ return ENOBUFS;
}
/* is there an upcall waiting for this flow? */
@@ -1426,7 +1426,7 @@
free(rte, M_MRTABLE);
m_freem(mb0);
splx(s);
- return (ENOBUFS);
+ return ENOBUFS;
}
/* insert new entry at head of hash chain */
@@ -1469,7 +1469,7 @@
free(rte, M_MRTABLE);
m_freem(mb0);
splx(s);
- return (0);
+ return 0;
}
/* Add this entry to the end of the queue */
@@ -1485,7 +1485,7 @@
splx(s);
- return (0);
+ return 0;
}
}
@@ -1601,13 +1601,13 @@
;
if (vifi >= numvifs) {
/* The iif is not found: ignore the packet. */
- return (0);
+ return 0;
}
if (rt->mfc_flags[vifi] &
Home |
Main Index |
Thread Index |
Old Index