diff options
author | 2001-01-16 02:41:17 +0000 | |
---|---|---|
committer | 2001-01-16 02:41:17 +0000 | |
commit | 3930882ae2607ed6e84b7e01af5c2b18c4d2c7c3 (patch) | |
tree | c25365fc07bf8019da1c6b10ad733d1787b204be | |
parent | e7ff14a7b9f4e2b36dfff9a110a794738257fd69 (diff) | |
download | bsdgames-darwin-3930882ae2607ed6e84b7e01af5c2b18c4d2c7c3.tar.gz bsdgames-darwin-3930882ae2607ed6e84b7e01af5c2b18c4d2c7c3.tar.zst bsdgames-darwin-3930882ae2607ed6e84b7e01af5c2b18c4d2c7c3.zip |
avoid C sequence point issues warned about by development version of gcc.
-rw-r--r-- | monop/misc.c | 6 | ||||
-rw-r--r-- | monop/prop.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/monop/misc.c b/monop/misc.c index 635604c6..f06ae323 100644 --- a/monop/misc.c +++ b/monop/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.9 1999/09/30 18:01:32 jsm Exp $ */ +/* $NetBSD: misc.c,v 1.10 2001/01/16 02:41:17 cgd Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: misc.c,v 1.9 1999/09/30 18:01:32 jsm Exp $"); +__RCSID("$NetBSD: misc.c,v 1.10 2001/01/16 02:41:17 cgd Exp $"); #endif #endif /* not lint */ @@ -85,7 +85,7 @@ notify() void next_play() { - player = ++player % num_play; + player = (player + 1) % num_play; cur_p = &play[player]; num_doub = 0; } diff --git a/monop/prop.c b/monop/prop.c index 5c4d27e1..c1a016f5 100644 --- a/monop/prop.c +++ b/monop/prop.c @@ -1,4 +1,4 @@ -/* $NetBSD: prop.c,v 1.6 1999/09/09 17:27:59 jsm Exp $ */ +/* $NetBSD: prop.c,v 1.7 2001/01/16 02:41:17 cgd Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)prop.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: prop.c,v 1.6 1999/09/09 17:27:59 jsm Exp $"); +__RCSID("$NetBSD: prop.c,v 1.7 2001/01/16 02:41:17 cgd Exp $"); #endif #endif /* not lint */ @@ -179,7 +179,7 @@ bid() cur_max = 0; num_in = num_play; while (num_in > 1 || (cur_max == 0 && num_in > 0)) { - i = ++i % num_play; + i = (i + 1) % num_play; if (in[i]) { do { (void)sprintf(buf, "%s: ", name_list[i]); @@ -200,7 +200,7 @@ bid() } if (cur_max != 0) { while (!in[i]) - i = ++i % num_play; + i = (i + 1) % num_play; printf("It goes to %s (%d) for $%d\n",play[i].name,i+1,cur_max); buy(i, &board[cur_p->loc]); play[i].money -= cur_max; |