summaryrefslogtreecommitdiffstats
path: root/cribbage/io.c
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2011-05-23 22:48:52 +0000
committerjoerg <joerg@NetBSD.org>2011-05-23 22:48:52 +0000
commit9ce1aef25e2dbc2ba90cefbb42dc0466f9249da3 (patch)
tree2aa30d3cfc2bc0c5a135a00f49f1e3205a8c1ab9 /cribbage/io.c
parent6ab4965434cb30f31450949e29f988bc4915e16d (diff)
downloadbsdgames-darwin-9ce1aef25e2dbc2ba90cefbb42dc0466f9249da3.tar.gz
bsdgames-darwin-9ce1aef25e2dbc2ba90cefbb42dc0466f9249da3.tar.zst
bsdgames-darwin-9ce1aef25e2dbc2ba90cefbb42dc0466f9249da3.zip
Don't use variables as format strings.
Diffstat (limited to 'cribbage/io.c')
-rw-r--r--cribbage/io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cribbage/io.c b/cribbage/io.c
index 809dc12c..ed750784 100644
--- a/cribbage/io.c
+++ b/cribbage/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.25 2011/05/23 22:47:22 joerg Exp $ */
+/* $NetBSD: io.c,v 1.26 2011/05/23 22:48:52 joerg Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: io.c,v 1.25 2011/05/23 22:47:22 joerg Exp $");
+__RCSID("$NetBSD: io.c,v 1.26 2011/05/23 22:48:52 joerg Exp $");
#endif
#endif /* not lint */
@@ -106,13 +106,13 @@ msgcrd(CARD c, BOOLEAN brfrank, const char *mid, BOOLEAN brfsuit)
if (brfrank)
addmsg("%1.1s", rankchar[c.rank]);
else
- addmsg(rankname[c.rank]);
+ addmsg("%s", rankname[c.rank]);
if (mid != NULL)
- addmsg(mid);
+ addmsg("%s", mid);
if (brfsuit)
addmsg("%1.1s", suitchar[c.suit]);
else
- addmsg(suitname[c.suit]);
+ addmsg("%s", suitname[c.suit]);
return (TRUE);
}
@@ -180,7 +180,7 @@ infrom(const CARD hand[], int n, const char *prompt)
exit(74);
}
for (;;) {
- msg(prompt);
+ msg("%s", prompt);
if (incard(&crd)) { /* if card is full card */
if (!is_one(crd, hand, n))
msg("That's not in your hand");
@@ -330,7 +330,7 @@ number(int lo, int hi, const char *prompt)
int sum;
for (sum = 0;;) {
- msg(prompt);
+ msg("%s", prompt);
if (!(p = get_line()) || *p == '\0') {
msg(quiet ? "Not a number" :
"That doesn't look like a number");