summaryrefslogtreecommitdiffstats
path: root/gomoku/bdinit.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2012-10-13 20:57:35 +0000
committerdholland <dholland@NetBSD.org>2012-10-13 20:57:35 +0000
commitc8cd2374db6fe8db6f4149ff6f9afdae32fe2473 (patch)
tree0664ffbc205fa1540b9380c01541a29317f21768 /gomoku/bdinit.c
parent9dd4e8160113cfc09566aaca86552ba8831e3759 (diff)
downloadbsdgames-darwin-c8cd2374db6fe8db6f4149ff6f9afdae32fe2473.tar.gz
bsdgames-darwin-c8cd2374db6fe8db6f4149ff6f9afdae32fe2473.zip
Pass -Wstrict-overflow... mostly.
Diffstat (limited to 'gomoku/bdinit.c')
-rw-r--r--gomoku/bdinit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gomoku/bdinit.c b/gomoku/bdinit.c
index 9592fe04..2fb2f85b 100644
--- a/gomoku/bdinit.c
+++ b/gomoku/bdinit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bdinit.c,v 1.8 2009/08/12 06:19:17 dholland Exp $ */
+/* $NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $ */
/*
* Copyright (c) 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "from: @(#)bdinit.c 8.2 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: bdinit.c,v 1.8 2009/08/12 06:19:17 dholland Exp $");
+__RCSID("$NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $");
#endif
#endif /* not lint */
@@ -177,6 +177,7 @@ init_overlap(void)
{
struct spotstr *sp1, *sp2;
struct combostr *cbp;
+ unsigned frameix;
int i, f, r, n, d1, d2;
int mask, bmask, vertex, s;
u_char *str;
@@ -186,7 +187,8 @@ init_overlap(void)
memset(intersect, 0, sizeof(intersect));
str = &overlap[FAREA * FAREA];
ip = &intersect[FAREA * FAREA];
- for (cbp = frames + FAREA; --cbp >= frames; ) { /* each frame */
+ for (frameix = FAREA; frameix-- > 0; ) { /* each frame */
+ cbp = &frames[frameix];
str -= FAREA;
ip -= FAREA;
sp1 = &board[vertex = cbp->c_vertex];