Date: Sun, 27 Dec 2009 10:21:58 GMT From: Henning Petersen <henning.petersen@t-online.de> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/142066: Missing parenthesis in sys/netinet/sctp_pcb.c . Message-ID: <200912271021.nBRALwWq091627@www.freebsd.org> Resent-Message-ID: <200912271030.nBRAU31q091626@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 142066
>Category: kern
>Synopsis: Missing parenthesis in sys/netinet/sctp_pcb.c .
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 27 10:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Henning Petersen
>Release: Freebsd-current
>Organization:
>Environment:
>Description:
Missplaced parenthesis found with cppcheck.
>How-To-Repeat:
>Fix:
diff -u -r1.94 sctp_pcb.c
--- sys/netinet/sctp_pcb.c 17 Nov 2009 20:56:14 -0000 1.94
+++ sys/netinet/sctp_pcb.c 27 Dec 2009 10:11:48 -0000
@@ -6385,7 +6385,7 @@
}
skip_vtag_check:
- chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))];
+ chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)];
/* Now what about timed wait ? */
if (!LIST_EMPTY(chain)) {
/*
Patch attached with submission follows:
Index: sys/netinet/sctp_pcb.c
===================================================================
RCS file: /usr/ncvs/src/sys/netinet/sctp_pcb.c,v
retrieving revision 1.94
diff -u -r1.94 sctp_pcb.c
--- sys/netinet/sctp_pcb.c 17 Nov 2009 20:56:14 -0000 1.94
+++ sys/netinet/sctp_pcb.c 27 Dec 2009 10:11:48 -0000
@@ -6385,7 +6385,7 @@
}
skip_vtag_check:
- chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))];
+ chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)];
/* Now what about timed wait ? */
if (!LIST_EMPTY(chain)) {
/*
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912271021.nBRALwWq091627>
