diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-08-24 12:45:09 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-08-24 12:45:09 +0000 |
commit | ccec58ca7e5b85e2ec0c39b2ac99e9945edb8fef (patch) | |
tree | e4af9f94fbcc1a553beb7b36e2e32f32c4388e8d /sys/net/rtsock.c | |
parent | 07e48803bb4877316b2b432a8b0b6e39146d2047 (diff) |
last is a pointer so initialize to NULL and not 0. Also move initialization
up to the declaration.
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3a9bcae337b..9a424137104 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.105 2010/07/14 20:56:35 claudio Exp $ */ +/* $OpenBSD: rtsock.c,v 1.106 2010/08/24 12:45:08 claudio Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -302,7 +302,7 @@ route_input(struct mbuf *m0, ...) struct routecb *rop; struct mbuf *m = m0; int sockets = 0; - struct socket *last; + struct socket *last = NULL; va_list ap; struct sockproto *proto; struct sockaddr *sosrc, *sodst; @@ -319,7 +319,6 @@ route_input(struct mbuf *m0, ...) return; } - last = 0; LIST_FOREACH(rp, &rawcb, rcb_list) { if (rp->rcb_proto.sp_family != proto->sp_family) continue; |