Swap neighboring lines of callout_init() and bzero() of container

struct in syn_cache_add(); the bzero() invalidates whatever
callout_init() has done (which might matter, but presently doesn't).
This commit is contained in:
he 2003-02-25 22:12:24 +00:00
parent 3ea6b8be93
commit 27bc436921
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_input.c,v 1.160 2003/01/04 23:43:06 wiz Exp $ */ /* $NetBSD: tcp_input.c,v 1.161 2003/02/25 22:12:24 he Exp $ */
/* /*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -152,7 +152,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.160 2003/01/04 23:43:06 wiz Exp $"); __KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.161 2003/02/25 22:12:24 he Exp $");
#include "opt_inet.h" #include "opt_inet.h"
#include "opt_ipsec.h" #include "opt_ipsec.h"
@ -3587,8 +3587,8 @@ syn_cache_add(src, dst, th, hlen, so, m, optp, optlen, oi)
* Fill in the cache, and put the necessary IP and TCP * Fill in the cache, and put the necessary IP and TCP
* options into the reply. * options into the reply.
*/ */
callout_init(&sc->sc_timer);
bzero(sc, sizeof(struct syn_cache)); bzero(sc, sizeof(struct syn_cache));
callout_init(&sc->sc_timer);
bcopy(src, &sc->sc_src, src->sa_len); bcopy(src, &sc->sc_src, src->sa_len);
bcopy(dst, &sc->sc_dst, dst->sa_len); bcopy(dst, &sc->sc_dst, dst->sa_len);
sc->sc_flags = 0; sc->sc_flags = 0;