diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-05-03 21:15:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-05-03 21:15:12 +0000 |
commit | 492edca4204c3a1bbefa82cd0298b4bc5044d58c (patch) | |
tree | cc04c242a406e06fa0b22325e0c00875a2d3ca78 /sys/kern/kern_sysctl.c | |
parent | 59195b3dfca23fbd322412cb1fc7f5fc476edee8 (diff) |
string fixes; tedu ok
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 338027df657..62a58eeaea2 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.80 2003/04/25 20:06:41 grange Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.81 2003/05/03 21:14:59 deraadt Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -1284,8 +1284,9 @@ sysctl_diskinit(update, p) for (dk = TAILQ_FIRST(&disklist), i = 0, l = 0; dk; dk = TAILQ_NEXT(dk, dk_link), i++) { - l += sprintf(disknames + l, "%s,", + snprintf(disknames + l, tlen - l, "%s,", dk->dk_name ? dk->dk_name : ""); + l += strlen(disknames + l); sdk = diskstats + i; sdk->ds_busy = dk->dk_busy; sdk->ds_xfer = dk->dk_xfer; |