Source-Changes-HG archive

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

[src/trunk]: src/sbin/bioctl Simplify



details:   https://anonhg.NetBSD.org/src/rev/09a921b4ddfa
branches:  trunk
changeset: 765407:09a921b4ddfa
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed May 25 15:34:19 2011 +0000

description:
Simplify

diffstat:

 sbin/bioctl/bioctl.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 8c594a5df1eb -r 09a921b4ddfa sbin/bioctl/bioctl.c
--- a/sbin/bioctl/bioctl.c      Wed May 25 15:24:07 2011 +0000
+++ b/sbin/bioctl/bioctl.c      Wed May 25 15:34:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bioctl.c,v 1.13 2010/02/20 22:25:54 ahoka Exp $ */
+/* $NetBSD: bioctl.c,v 1.14 2011/05/25 15:34:19 joerg Exp $ */
 /* $OpenBSD: bioctl.c,v 1.52 2007/03/20 15:26:06 jmc Exp $ */
 
 /*
@@ -31,7 +31,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: bioctl.c,v 1.13 2010/02/20 22:25:54 ahoka Exp $");
+__RCSID("$NetBSD: bioctl.c,v 1.14 2011/05/25 15:34:19 joerg Exp $");
 #endif
 
 #include <sys/types.h>
@@ -320,9 +320,9 @@
        }
 
        if (rtypestr)
-               snprintf(rtype, sizeof(rtype), rtypestr);
+               strlcpy(rtype, rtypestr, sizeof(rtype));
        if (stripestr)
-               snprintf(stripe, sizeof(stripe), stripestr);
+               strlcpy(stripe, stripestr, sizeof(stripe));
        else
                snprintf(stripe, sizeof(stripe), "%uK", bv.bv_stripe_size);
 



Home | Main Index | Thread Index | Old Index