diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-11-16 04:49:50 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-11-16 04:49:50 +0000 |
commit | f2273a76226705a4e8f5e015d1835449da4e3242 (patch) | |
tree | 9aa8ab3b6fae60c8e2a7a05923b9b6f239d3f864 /games/snake/snake.c | |
parent | 3243c629699c25f7f4a576fe1c2f58e274eba8f7 (diff) |
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/snake.c')
-rw-r--r-- | games/snake/snake.c | 5 |
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."); |