From f2273a76226705a4e8f5e015d1835449da4e3242 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Sun, 16 Nov 2014 04:49:50 +0000 Subject: Eliminate pointless use of , , , and Replace MAXPATHLEN with PATH_MAX and MAXLOGNAME with LOGIN_NAME_MAX Pull in where needed Prefer sizeof(var) over MAXFOO or FOO_MAX ok deraadt@ --- games/tetris/scores.c | 9 +++++---- games/tetris/scores.h | 10 +++++----- games/tetris/tetris.c | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) (limited to 'games/tetris') diff --git a/games/tetris/scores.c b/games/tetris/scores.c index 5f52b02b706..6903d6221cb 100644 --- a/games/tetris/scores.c +++ b/games/tetris/scores.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scores.c,v 1.11 2006/04/20 03:25:36 ray Exp $ */ +/* $OpenBSD: scores.c,v 1.12 2014/11/16 04:49:49 guenther Exp $ */ /* $NetBSD: scores.c,v 1.2 1995/04/22 07:42:38 cgd Exp $ */ /*- @@ -42,9 +42,13 @@ * * Major whacks since then. */ +#include +#include + #include #include #include +#include #include #include #include @@ -52,9 +56,6 @@ #include #include #include -#include -#include -#include #include "pathnames.h" #include "screen.h" diff --git a/games/tetris/scores.h b/games/tetris/scores.h index cd3f9d27b4b..6aaa0741a41 100644 --- a/games/tetris/scores.h +++ b/games/tetris/scores.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scores.h,v 1.5 2003/06/03 03:01:41 millert Exp $ */ +/* $OpenBSD: scores.h,v 1.6 2014/11/16 04:49:49 guenther Exp $ */ /* $NetBSD: scores.h,v 1.2 1995/04/22 07:42:40 cgd Exp $ */ /*- @@ -39,10 +39,10 @@ * Tetris scores. */ struct highscore { - char hs_name[MAXLOGNAME]; /* login name */ - int hs_score; /* raw score */ - int hs_level; /* play level */ - time_t hs_time; /* time at game end */ + char hs_name[LOGIN_NAME_MAX]; /* login name */ + int hs_score; /* raw score */ + int hs_level; /* play level */ + time_t hs_time; /* time at game end */ }; #define MAXHISCORES 80 diff --git a/games/tetris/tetris.c b/games/tetris/tetris.c index 7e7bc9f281a..eff466b7b5f 100644 --- a/games/tetris/tetris.c +++ b/games/tetris/tetris.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tetris.c,v 1.24 2013/08/29 20:22:20 naddy Exp $ */ +/* $OpenBSD: tetris.c,v 1.25 2014/11/16 04:49:49 guenther Exp $ */ /* $NetBSD: tetris.c,v 1.2 1995/04/22 07:42:47 cgd Exp $ */ /*- @@ -39,11 +39,11 @@ * Tetris (or however it is spelled). */ -#include #include #include #include +#include #include #include #include -- cgit v1.2.3