summaryrefslogtreecommitdiff
path: root/usr.sbin/altq/altqstat/qdisc_priq.c
diff options
context:
space:
mode:
authorKenjiro Cho <kjc@cvs.openbsd.org>2001-08-16 12:59:44 +0000
committerKenjiro Cho <kjc@cvs.openbsd.org>2001-08-16 12:59:44 +0000
commitb5c8e7c1615165eaa2f24583a32abe1059bea123 (patch)
treecd2bd3c3763dd3e03ab4e2c08f93d6fc11feac9a /usr.sbin/altq/altqstat/qdisc_priq.c
parentd64a7d79fc33fe1332cb6af09067b0140772da17 (diff)
sync with KAME.
altq userland cleanup: - string operation audit - remove variable names from function prototypes - clean up error messages
Diffstat (limited to 'usr.sbin/altq/altqstat/qdisc_priq.c')
-rw-r--r--usr.sbin/altq/altqstat/qdisc_priq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/altq/altqstat/qdisc_priq.c b/usr.sbin/altq/altqstat/qdisc_priq.c
index 868407eb836..db4a2f55279 100644
--- a/usr.sbin/altq/altqstat/qdisc_priq.c
+++ b/usr.sbin/altq/altqstat/qdisc_priq.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: qdisc_priq.c,v 1.1 2001/06/27 18:23:21 kjc Exp $ */
-/* $KAME: qdisc_priq.c,v 1.1 2000/10/18 09:15:17 kjc Exp $ */
+/* $OpenBSD: qdisc_priq.c,v 1.2 2001/08/16 12:59:43 kjc Exp $ */
+/* $KAME: qdisc_priq.c,v 1.2 2001/08/15 12:51:59 kjc Exp $ */
/*
* Copyright (C) 2000
* Sony Computer Science Laboratories, Inc. All rights reserved.
@@ -58,7 +58,8 @@ priq_stat_loop(int fd, const char *ifname, int count, int interval)
double sec;
int cnt = count;
- strcpy(get_stats.iface.ifname, ifname);
+ strlcpy(get_stats.iface.ifname, ifname,
+ sizeof(get_stats.iface.ifname));
new = &stats1[0];
last = &stats2[0];
@@ -86,7 +87,7 @@ priq_stat_loop(int fd, const char *ifname, int count, int interval)
if (sp->class_handle != lp->class_handle) {
quip_chandle2name(ifname, sp->class_handle,
- clnames[i]);
+ clnames[i], sizeof(clnames[0]));
continue;
}