Module Name: src Committed By: christos Date: Wed Mar 26 17:56:18 UTC 2014
Modified Files: src/sys/arch/ews4800mips/sbd: kbms_sbdio.c src/sys/arch/ews4800mips/stand/common: disk.c Log Message: kill sprintf To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ews4800mips/sbd/kbms_sbdio.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ews4800mips/stand/common/disk.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/ews4800mips/sbd/kbms_sbdio.c diff -u src/sys/arch/ews4800mips/sbd/kbms_sbdio.c:1.10 src/sys/arch/ews4800mips/sbd/kbms_sbdio.c:1.11 --- src/sys/arch/ews4800mips/sbd/kbms_sbdio.c:1.10 Sat Oct 13 02:08:30 2012 +++ src/sys/arch/ews4800mips/sbd/kbms_sbdio.c Wed Mar 26 13:56:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kbms_sbdio.c,v 1.10 2012/10/13 06:08:30 tsutsui Exp $ */ +/* $NetBSD: kbms_sbdio.c,v 1.11 2014/03/26 17:56:18 christos Exp $ */ /*- * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kbms_sbdio.c,v 1.10 2012/10/13 06:08:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbms_sbdio.c,v 1.11 2014/03/26 17:56:18 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -503,7 +503,7 @@ mouse_debug_print(u_int buttons, int x, __y = MINMAX(__y + y, 0, FB_HEIGHT); *(uint8_t *)(fb.fb_addr + __x + __y * FB_LINEBYTES) = 0xff; - sprintf(buf, "%8d %8d", x, y); + snprintf(buf, sizeof(buf), "%8d %8d", x, y); for (i = 0; i < 64 && buf[i]; i++) fb_drawchar(480 + i * 12, k, buf[i]); Index: src/sys/arch/ews4800mips/stand/common/disk.c diff -u src/sys/arch/ews4800mips/stand/common/disk.c:1.7 src/sys/arch/ews4800mips/stand/common/disk.c:1.8 --- src/sys/arch/ews4800mips/stand/common/disk.c:1.7 Wed Feb 4 10:22:13 2009 +++ src/sys/arch/ews4800mips/stand/common/disk.c Wed Mar 26 13:56:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: disk.c,v 1.7 2009/02/04 15:22:13 tsutsui Exp $ */ +/* $NetBSD: disk.c,v 1.8 2014/03/26 17:56:18 christos Exp $ */ /*- * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc. @@ -285,9 +285,8 @@ __fd_progress_msg(int pos) { char msg[16]; - memset(msg, 0, sizeof msg); - sprintf(msg, "C%d H%d S%d \r", (pos >> 16) & 0xff, (pos >> 8) & 0xff, - pos & 0xff); + snprintf(msg, sizeof(msg), "C%d H%d S%d \r", + (pos >> 16) & 0xff, (pos >> 8) & 0xff, pos & 0xff); printf("%s", msg); } #endif