summaryrefslogtreecommitdiffstats
path: root/mille
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-05-25 23:14:33 +0000
committerdholland <dholland@NetBSD.org>2009-05-25 23:14:33 +0000
commitb699392ee5e6c55d892a0ab1a639208a373d9bab (patch)
tree4edbb8ac6ae03948294742a29c376a8854df46cd /mille
parent28a2fb534d0a6db57738352113f148c57f1078f1 (diff)
downloadbsdgames-darwin-b699392ee5e6c55d892a0ab1a639208a373d9bab.tar.gz
bsdgames-darwin-b699392ee5e6c55d892a0ab1a639208a373d9bab.tar.zst
bsdgames-darwin-b699392ee5e6c55d892a0ab1a639208a373d9bab.zip
sprintf -> snprintf
Diffstat (limited to 'mille')
-rw-r--r--mille/extern.c6
-rw-r--r--mille/mille.h5
-rw-r--r--mille/save.c6
3 files changed, 9 insertions, 8 deletions
diff --git a/mille/extern.c b/mille/extern.c
index 8c568cce..da46af16 100644
--- a/mille/extern.c
+++ b/mille/extern.c
@@ -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 @@ bool Debug, /* set if debugging code on */
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 */
diff --git a/mille/mille.h b/mille/mille.h
index 523d6f8e..b4e5cb38 100644
--- a/mille/mille.h
+++ b/mille/mille.h
@@ -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 @@ typedef struct {
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,
diff --git a/mille/save.c b/mille/save.c
index 1cb0592a..a2fd7be7 100644
--- a/mille/save.c
+++ b/mille/save.c
@@ -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 @@ rest_f(file)
/*
* 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;
}