Module Name:    src
Committed By:   dholland
Date:           Mon May 25 23:17:31 UTC 2009

Modified Files:
        src/games/mille: extern.c mille.h save.c

Log Message:
sprintf -> snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/games/mille/extern.c
cvs rdiff -u -r1.13 -r1.14 src/games/mille/mille.h
cvs rdiff -u -r1.12 -r1.13 src/games/mille/save.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/mille/extern.c
diff -u src/games/mille/extern.c:1.7 src/games/mille/extern.c:1.8
--- src/games/mille/extern.c:1.7	Thu Aug  7 09:37:25 2003
+++ src/games/mille/extern.c	Mon May 25 23:17:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.c,v 1.7 2003/08/07 09:37:25 agc Exp $	*/
+/*	$NetBSD: extern.c,v 1.8 2009/05/25 23:17:31 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)extern.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: extern.c,v 1.7 2003/08/07 09:37:25 agc Exp $");
+__RCSID("$NetBSD: extern.c,v 1.8 2009/05/25 23:17:31 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -51,7 +51,7 @@
 	Order,			/* set if hand should be sorted		*/
 	Saved;			/* set if game just saved		*/
 
-char	Initstr[100];		/* initial string for error field	*/
+char	Initstr[INITSTR_SIZE];	/* initial string for error field	*/
 const char	*C_fmt = "%-18.18s",	/* format for printing cards	*/
 	*Fromfile = NULL,	/* startup file for game		*/
 	*const _cn[NUM_CARDS] = {	/* Card name buffer		*/

Index: src/games/mille/mille.h
diff -u src/games/mille/mille.h:1.13 src/games/mille/mille.h:1.14
--- src/games/mille/mille.h:1.13	Tue Jan 27 20:30:30 2004
+++ src/games/mille/mille.h	Mon May 25 23:17:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mille.h,v 1.13 2004/01/27 20:30:30 jsm Exp $	*/
+/*	$NetBSD: mille.h,v 1.14 2009/05/25 23:17:31 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1993
@@ -211,7 +211,8 @@
 
 extern bool	Debug, Finished, Next, On_exit, Order, Saved;
 
-extern char	Initstr[];
+#define INITSTR_SIZE 100
+extern char	Initstr[INITSTR_SIZE];
 extern const char	*C_fmt, *const *C_name, *Fromfile;
 
 extern int	Card_no, End, Handstart, Movetype, Numgos,

Index: src/games/mille/save.c
diff -u src/games/mille/save.c:1.12 src/games/mille/save.c:1.13
--- src/games/mille/save.c:1.12	Mon Jan 28 05:55:10 2008
+++ src/games/mille/save.c	Mon May 25 23:17:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: save.c,v 1.12 2008/01/28 05:55:10 dholland Exp $	*/
+/*	$NetBSD: save.c,v 1.13 2009/05/25 23:17:31 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)save.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: save.c,v 1.12 2008/01/28 05:55:10 dholland Exp $");
+__RCSID("$NetBSD: save.c,v 1.13 2009/05/25 23:17:31 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -167,7 +167,7 @@
 	/*
 	 * initialize some necessary values
 	 */
-	(void)sprintf(Initstr, "%s [%s]\n", file, buf);
+	(void)snprintf(Initstr, INITSTR_SIZE, "%s [%s]\n", file, buf);
 	Fromfile = file;
 	return !On_exit;
 }

Reply via email to