Module Name: src
Committed By: christos
Date: Tue Aug 16 11:10:54 UTC 2011
Modified Files:
src/games/gomoku: main.c
Log Message:
avoid non-literal format strings.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/games/gomoku/main.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/gomoku/main.c
diff -u src/games/gomoku/main.c:1.25 src/games/gomoku/main.c:1.26
--- src/games/gomoku/main.c:1.25 Mon Mar 29 01:16:08 2010
+++ src/games/gomoku/main.c Tue Aug 16 07:10:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.25 2010/03/29 05:16:08 dholland Exp $ */
+/* $NetBSD: main.c,v 1.26 2011/08/16 11:10:54 christos Exp $ */
/*
* Copyright (c) 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: main.c,v 1.25 2010/03/29 05:16:08 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.26 2011/08/16 11:10:54 christos Exp $");
#endif
#endif /* not lint */
@@ -94,10 +94,6 @@
char *tmp;
int color, curmove, i, ch;
int input[2];
- static const char *const fmt[2] = {
- "%3d %-6s",
- "%3d %-6s"
- };
/* Revoke setgid privileges */
setgid(getgid());
@@ -295,7 +291,8 @@
break;
}
if (interactive) {
- misclog(fmt[color], movenum, stoc(curmove));
+ misclog("%3d%s%-6s", movenum, color ? " " : " ",
+ stoc(curmove));
}
if ((i = makemove(color, curmove)) != MOVEOK)
break;