From d1f9fe53b3021f33b8b648ee1ba234bbe44fe46a Mon Sep 17 00:00:00 2001 From: Bret Lambert Date: Tue, 24 Aug 2010 14:43:57 +0000 Subject: legibility fixes: 1) one statement per line 2) label gets its own line, and doesn't share it with a statement no functional change "Let the turd shine." claudio@ --- sys/net/if_atmsubr.c | 12 +++++++----- sys/net/if_ethersubr.c | 12 +++++++----- sys/net/if_fddisubr.c | 12 +++++++----- 3 files changed, 21 insertions(+), 15 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index 435a98c6268..b07afc9b856 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atmsubr.c,v 1.31 2010/05/07 13:33:16 claudio Exp $ */ +/* $OpenBSD: if_atmsubr.c,v 1.32 2010/08/24 14:43:56 blambert Exp $ */ /* * @@ -171,10 +171,12 @@ atm_output(ifp, m0, dst, rt0) if (rt->rt_gwroute == 0) goto lookup; if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) { - rtfree(rt); rt = rt0; - lookup: rt->rt_gwroute = rtalloc1(rt->rt_gateway, - RT_REPORT, ifp->if_rdomain); - if ((rt = rt->rt_gwroute) == 0) + rtfree(rt); + rt = rt0; + lookup: + rt->rt_gwroute = rtalloc1(rt->rt_gateway, + RT_REPORT, ifp->if_rdomain); + if ((rt = rt->rt_gwroute) == NULL) senderr(EHOSTUNREACH); } } diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 787dc8d160f..eb26a3d03c6 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.145 2010/07/02 00:49:43 claudio Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.146 2010/08/24 14:43:56 blambert Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -282,10 +282,12 @@ ether_output(ifp0, m0, dst, rt0) if (rt->rt_gwroute == 0) goto lookup; if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) { - rtfree(rt); rt = rt0; - lookup: rt->rt_gwroute = rtalloc1(rt->rt_gateway, - RT_REPORT, ifp->if_rdomain); - if ((rt = rt->rt_gwroute) == 0) + rtfree(rt); + rt = rt0; + lookup: + rt->rt_gwroute = rtalloc1(rt->rt_gateway, + RT_REPORT, ifp->if_rdomain); + if ((rt = rt->rt_gwroute) == NULL) senderr(EHOSTUNREACH); } } diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index dfb77c88e68..1fffd0df194 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fddisubr.c,v 1.59 2010/05/07 13:33:16 claudio Exp $ */ +/* $OpenBSD: if_fddisubr.c,v 1.60 2010/08/24 14:43:56 blambert Exp $ */ /* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */ /* @@ -189,10 +189,12 @@ fddi_output(ifp0, m0, dst, rt0) if (rt->rt_gwroute == 0) goto lookup; if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) { - rtfree(rt); rt = rt0; - lookup: rt->rt_gwroute = rtalloc1(rt->rt_gateway, - RT_REPORT, ifp->if_rdomain); - if ((rt = rt->rt_gwroute) == 0) + rtfree(rt); + rt = rt0; + lookup: + rt->rt_gwroute = rtalloc1(rt->rt_gateway, + RT_REPORT, ifp->if_rdomain); + if ((rt = rt->rt_gwroute) == NULL) senderr(EHOSTUNREACH); } } -- cgit v1.2.3