From owner-svn-src-stable-8@FreeBSD.ORG Sun Dec 6 19:01:33 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E722B106566C; Sun, 6 Dec 2009 19:01:33 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D514D8FC1A; Sun, 6 Dec 2009 19:01:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB6J1Xre028818; Sun, 6 Dec 2009 19:01:33 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB6J1X7L028816; Sun, 6 Dec 2009 19:01:33 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200912061901.nB6J1X7L028816@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 6 Dec 2009 19:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200184 - stable/8/sbin/ipfw X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 19:01:34 -0000 Author: luigi Date: Sun Dec 6 19:01:33 2009 New Revision: 200184 URL: http://svn.freebsd.org/changeset/base/200184 Log: mfc r200056 use qsort_r instead of heapsort; staticize two functions. Modified: stable/8/sbin/ipfw/dummynet.c Modified: stable/8/sbin/ipfw/dummynet.c ============================================================================== --- stable/8/sbin/ipfw/dummynet.c Sun Dec 6 18:04:26 2009 (r200183) +++ stable/8/sbin/ipfw/dummynet.c Sun Dec 6 19:01:33 2009 (r200184) @@ -78,7 +78,7 @@ static struct _s_x dummynet_params[] = { }; static int -sort_q(const void *pa, const void *pb) +sort_q(void *arg, const void *pa, const void *pb) { int rev = (co.do_sort < 0); int field = rev ? -co.do_sort : co.do_sort; @@ -121,7 +121,7 @@ list_queues(struct dn_flow_set *fs, stru return; if (co.do_sort != 0) - heapsort(q, fs->rq_elements, sizeof *q, sort_q); + qsort_r(q, fs->rq_elements, sizeof *q, NULL, sort_q); /* Print IPv4 flows */ index_printed = 0; @@ -486,7 +486,7 @@ is_valid_number(const char *s) * and return the numeric bandwidth value. * set clocking interface or bandwidth value */ -void +static void read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen) { if (*bandwidth != -1) @@ -530,7 +530,7 @@ struct point { double delay; }; -int +static int compare_points(const void *vp1, const void *vp2) { const struct point *p1 = vp1;