Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpcap calloc() arg mistake. it's (nelem, size). from...



details:   https://anonhg.NetBSD.org/src/rev/93a03b73b882
branches:  trunk
changeset: 535208:93a03b73b882
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Aug 12 02:39:22 2002 +0000

description:
calloc() arg mistake.  it's (nelem, size).  from openbsd
sync w/tcpdump.org

diffstat:

 lib/libpcap/optimize.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 00cda66e053b -r 93a03b73b882 lib/libpcap/optimize.c
--- a/lib/libpcap/optimize.c    Mon Aug 12 02:37:26 2002 +0000
+++ b/lib/libpcap/optimize.c    Mon Aug 12 02:39:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: optimize.c,v 1.13 2001/01/06 02:11:18 christos Exp $   */
+/*     $NetBSD: optimize.c,v 1.14 2002/08/12 02:39:22 itojun Exp $     */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996
@@ -28,7 +28,7 @@
 static const char rcsid[] =
     "@(#) Header: optimize.c,v 1.60 96/09/26 23:28:14 leres Exp  (LBL)";
 #else
-__RCSID("$NetBSD: optimize.c,v 1.13 2001/01/06 02:11:18 christos Exp $");
+__RCSID("$NetBSD: optimize.c,v 1.14 2002/08/12 02:39:22 itojun Exp $");
 #endif
 #endif
 
@@ -1920,7 +1920,7 @@
 
        /* generate offset[] for convenience  */
        if (slen) {
-               offset = (struct slist **)calloc(sizeof(struct slist *), slen);
+               offset = (struct slist **)calloc(slen, sizeof(struct slist *));
                if (!offset) {
                        bpf_error("not enough core");
                        /*NOTREACHED*/



Home | Main Index | Thread Index | Old Index