summaryrefslogtreecommitdiffstats
path: root/games/snake
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-11-16 04:49:48 +0000
committerguenther <guenther@openbsd.org>2014-11-16 04:49:48 +0000
commit34278d36bdc7f846d8005fae83450c1c510268e0 (patch)
tree01c05c4d62e09e297dfcc54a3fdfbb034d6074d4 /games/snake
parentStop using <sys/param.h>; replace MAXPATHLEN with PATH_MAX, stop using MAX(), (diff)
downloadwireguard-openbsd-34278d36bdc7f846d8005fae83450c1c510268e0.tar.xz
wireguard-openbsd-34278d36bdc7f846d8005fae83450c1c510268e0.zip
Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,
and <sys/ttydefaults.h> Replace MAXPATHLEN with PATH_MAX and MAXLOGNAME with LOGIN_NAME_MAX Pull in <limits.h> where needed Prefer sizeof(var) over MAXFOO or FOO_MAX ok deraadt@
Diffstat (limited to 'games/snake')
-rw-r--r--games/snake/snake.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/games/snake/snake.c b/games/snake/snake.c
index d6ce2d4482d..e74e616435b 100644
--- a/games/snake/snake.c
+++ b/games/snake/snake.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snake.c,v 1.15 2013/08/29 20:22:20 naddy Exp $ */
+/* $OpenBSD: snake.c,v 1.16 2014/11/16 04:49:49 guenther Exp $ */
/* $NetBSD: snake.c,v 1.8 1995/04/29 00:06:41 mycroft Exp $ */
/*
@@ -41,7 +41,6 @@
* cc -O snake.c move.c -o snake -lm -lcurses
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -184,7 +183,7 @@ main(int argc, char *argv[])
if (!ccnt || ccnt > COLS - 3)
ccnt = COLS - 3;
- i = MIN(lcnt, ccnt);
+ i = lcnt < ccnt ? lcnt : ccnt;
if (i < 4) {
endwin();
errx(1, "screen too small for a fair game.");