summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/dummynet.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2009-12-03 12:23:48 +0000
committerluigi <luigi@FreeBSD.org>2009-12-03 12:23:48 +0000
commit98a49a66136b100b6da8d23225fb6e19e1bcdd22 (patch)
tree08eff56210db58e41fd3e67bd0315d505c5ed408 /sbin/ipfw/dummynet.c
parent81ccd8ba963a070b46b8cddcfca13cbdb5a91dee (diff)
downloadFreeBSD-src-98a49a66136b100b6da8d23225fb6e19e1bcdd22.zip
FreeBSD-src-98a49a66136b100b6da8d23225fb6e19e1bcdd22.tar.gz
use qsort_r instead of heapsort;
staticize two functions. MFC after: 3 days
Diffstat (limited to 'sbin/ipfw/dummynet.c')
-rw-r--r--sbin/ipfw/dummynet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ipfw/dummynet.c b/sbin/ipfw/dummynet.c
index 41ad48e..9e68e65 100644
--- a/sbin/ipfw/dummynet.c
+++ b/sbin/ipfw/dummynet.c
@@ -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, struct dn_flow_queue *q)
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;
OpenPOWER on IntegriCloud