correct variable initialization. reported by fujitsu folks

This commit is contained in:
itojun 2002-04-10 09:18:57 +00:00
parent 3bc20d3480
commit 45451927ec
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_ecn.c,v 1.11 2001/11/13 00:32:36 lukem Exp $ */
/* $NetBSD: ip_ecn.c,v 1.12 2002/04/10 09:18:57 itojun Exp $ */
/* $KAME: ip_ecn.c,v 1.11 2001/05/03 16:09:29 itojun Exp $ */
/*
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_ecn.c,v 1.11 2001/11/13 00:32:36 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_ecn.c,v 1.12 2002/04/10 09:18:57 itojun Exp $");
#include "opt_inet.h"
@ -115,6 +115,7 @@ ip6_ecn_ingress(mode, outer, inner)
if (!outer || !inner)
panic("NULL pointer passed to ip6_ecn_ingress");
outer8 = (ntohl(*outer) >> 20) & 0xff;
inner8 = (ntohl(*inner) >> 20) & 0xff;
ip_ecn_ingress(mode, &outer8, &inner8);
*outer &= ~htonl(0xff << 20);
@ -133,6 +134,7 @@ ip6_ecn_egress(mode, outer, inner)
panic("NULL pointer passed to ip6_ecn_egress");
outer8 = (ntohl(*outer) >> 20) & 0xff;
inner8 = (ntohl(*inner) >> 20) & 0xff;
ip_ecn_egress(mode, &outer8, &inner8);
*inner &= ~htonl(0xff << 20);
*inner |= htonl((u_int32_t)inner8 << 20);