summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2010-08-24 14:43:56 +0000
committerblambert <blambert@openbsd.org>2010-08-24 14:43:56 +0000
commit4785a05c9a8593e78e10913cc8a59df6c24eb0ac (patch)
tree02c7ffbe40218561227f82b1114703470292a667 /sys
parentlast is a pointer so initialize to NULL and not 0. Also move initialization (diff)
downloadwireguard-openbsd-4785a05c9a8593e78e10913cc8a59df6c24eb0ac.tar.xz
wireguard-openbsd-4785a05c9a8593e78e10913cc8a59df6c24eb0ac.zip
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@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_atmsubr.c12
-rw-r--r--sys/net/if_ethersubr.c12
-rw-r--r--sys/net/if_fddisubr.c12
3 files changed, 21 insertions, 15 deletions
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);
}
}