diff options
author | dholland <dholland@NetBSD.org> | 2009-06-04 07:01:16 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-06-04 07:01:16 +0000 |
commit | 61a762274b6c7fc952ab3500cf1eca3436206334 (patch) | |
tree | 71d5574afce5037ffeabaf11c80f1b8ef03fe600 /gomoku/pickmove.c | |
parent | 623eaf6b2f42d9ed305a0dc43ac06759ba6916a6 (diff) | |
download | bsdgames-darwin-61a762274b6c7fc952ab3500cf1eca3436206334.tar.gz bsdgames-darwin-61a762274b6c7fc952ab3500cf1eca3436206334.tar.zst bsdgames-darwin-61a762274b6c7fc952ab3500cf1eca3436206334.zip |
Rectify non-compiling code that appears when DEBUG is defined.
Diffstat (limited to 'gomoku/pickmove.c')
-rw-r--r-- | gomoku/pickmove.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gomoku/pickmove.c b/gomoku/pickmove.c index 8f65d894..b7755358 100644 --- a/gomoku/pickmove.c +++ b/gomoku/pickmove.c @@ -1,4 +1,4 @@ -/* $NetBSD: pickmove.c,v 1.17 2009/06/04 06:41:50 dholland Exp $ */ +/* $NetBSD: pickmove.c,v 1.18 2009/06/04 07:01:16 dholland Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pickmove.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: pickmove.c,v 1.17 2009/06/04 06:41:50 dholland Exp $"); +__RCSID("$NetBSD: pickmove.c,v 1.18 2009/06/04 07:01:16 dholland Exp $"); #endif #endif /* not lint */ @@ -515,7 +515,7 @@ makecombo2(struct combostr *ocbp, struct spotstr *osp, int off, int s) combocnt--; } #ifdef DEBUG - if (c == 1 && debug > 1 || debug > 5) { + if ((c == 1 && debug > 1) || debug > 5) { markcombo(ncbp); bdisp(); whatsup(0); @@ -758,7 +758,7 @@ makecombo(struct combostr *ocbp, struct spotstr *osp, int off, int s) updatecombo(ncbp, curcolor); } #ifdef DEBUG - if (c == 1 && debug > 1 || debug > 4) { + if ((c == 1 && debug > 1) || debug > 4) { markcombo(ncbp); bdisp(); whatsup(0); @@ -1327,11 +1327,11 @@ void markcombo(struct combostr *ocbp) { struct combostr *cbp, *tcbp, **cbpp; - struct elist *ep, *nep, **epp; + struct elist *ep, *nep; struct spotstr *sp; int s, d, m, i; int nframes; - int r, n, flags, cmask, omask; + int cmask, omask; /* should never happen but check anyway */ if ((nframes = ocbp->c_nframes) >= MAXDEPTH) @@ -1350,7 +1350,7 @@ markcombo(struct combostr *ocbp) */ ep = &einfo[nframes]; cbpp = &ecombo[nframes]; - for (cbp = ocbp; tcbp = cbp->c_link[1]; cbp = cbp->c_link[0]) { + for (cbp = ocbp; (tcbp = cbp->c_link[1]) != NULL; cbp = cbp->c_link[0]) { ep--; ep->e_combo = cbp; *--cbpp = cbp->c_link[1]; @@ -1444,7 +1444,7 @@ clearcombo(struct combostr *cbp, int open) struct combostr *tcbp; int d, n, mask; - for (; tcbp = cbp->c_link[1]; cbp = cbp->c_link[0]) { + for (; (tcbp = cbp->c_link[1]) != NULL; cbp = cbp->c_link[0]) { clearcombo(tcbp, cbp->c_flags & C_OPEN_1); open = cbp->c_flags & C_OPEN_0; } |