diff options
| author | christos <christos@NetBSD.org> | 2014-03-25 16:19:13 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2014-03-25 16:19:13 +0000 |
| commit | 95e4dc1ef53e03d32c17523bf0c9d85a894cb59b (patch) | |
| tree | 82eb67bff76e19525098b11097af66534c183955 /sys/dev/raidframe | |
| parent | 9f98c16f37b75c9db25349ca8eefba4665d21e63 (diff) | |
kill sprintf
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_disks.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_general.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c index eadece49f0a..d16440c96a4 100644 --- a/sys/dev/raidframe/rf_disks.c +++ b/sys/dev/raidframe/rf_disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.84 2013/09/15 12:44:03 martin Exp $ */ +/* $NetBSD: rf_disks.c,v 1.85 2014/03/25 16:19:14 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -60,7 +60,7 @@ ***************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.84 2013/09/15 12:44:03 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.85 2014/03/25 16:19:14 christos Exp $"); #include <dev/raidframe/raidframevar.h> @@ -594,7 +594,8 @@ rf_ConfigureDisk(RF_Raid_t *raidPtr, char *bf, RF_RaidDisk_t *diskPtr, if (!strcmp("absent", diskPtr->devname)) { printf("Ignoring missing component at column %d\n", col); - sprintf(diskPtr->devname, "component%d", col); + snprintf(diskPtr->devname, sizeof(diskPtr->devname), + "component%d", col); diskPtr->status = rf_ds_failed; return (0); } diff --git a/sys/dev/raidframe/rf_general.h b/sys/dev/raidframe/rf_general.h index bc788b33153..baf9437d06f 100644 --- a/sys/dev/raidframe/rf_general.h +++ b/sys/dev/raidframe/rf_general.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_general.h,v 1.20 2013/09/15 12:06:50 martin Exp $ */ +/* $NetBSD: rf_general.h,v 1.21 2014/03/25 16:19:14 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -41,7 +41,7 @@ /* error reporting and handling */ -#include <sys/systm.h> /* printf, sprintf, and friends */ +#include <sys/systm.h> /* printf, snprintf, and friends */ #define RF_ERRORMSG(s) printf((s)) #define RF_ERRORMSG1(s,a) printf((s),(a)) |
