Module Name: src
Committed By: christos
Date: Wed Mar 26 17:55:26 UTC 2014
Modified Files:
src/sys/arch/hp300/dev: dio.c
Log Message:
kill sprintf
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hp300/dev/dio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/hp300/dev/dio.c
diff -u src/sys/arch/hp300/dev/dio.c:1.38 src/sys/arch/hp300/dev/dio.c:1.39
--- src/sys/arch/hp300/dev/dio.c:1.38 Sun Mar 6 09:51:21 2011
+++ src/sys/arch/hp300/dev/dio.c Wed Mar 26 13:55:26 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dio.c,v 1.38 2011/03/06 14:51:21 tsutsui Exp $ */
+/* $NetBSD: dio.c,v 1.39 2014/03/26 17:55:26 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dio.c,v 1.38 2011/03/06 14:51:21 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dio.c,v 1.39 2014/03/26 17:55:26 christos Exp $");
#define _HP300_INTR_H_PRIVATE
@@ -263,7 +263,8 @@ dio_devinfo(struct dio_attach_args *da,
}
} else {
foundit:
- sprintf(buf, "%s", dio_devdescs[i].dd_desc);
+ snprintf(buf, buflen, "%s",
+ dio_devdescs[i].dd_desc);
return buf;
}
}
@@ -273,7 +274,7 @@ dio_devinfo(struct dio_attach_args *da,
/*
* Device is unknown. Construct something reasonable.
*/
- sprintf(buf, "device id = 0x%x secid = 0x%x",
+ snprintf(buf, buflen, "device id = 0x%x secid = 0x%x",
da->da_id, da->da_secid);
return buf;
}