summaryrefslogtreecommitdiff
path: root/games/backgammon/common_source
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-11-16 04:49:50 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-11-16 04:49:50 +0000
commitf2273a76226705a4e8f5e015d1835449da4e3242 (patch)
tree9aa8ab3b6fae60c8e2a7a05923b9b6f239d3f864 /games/backgammon/common_source
parent3243c629699c25f7f4a576fe1c2f58e274eba8f7 (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/backgammon/common_source')
-rw-r--r--games/backgammon/common_source/save.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/games/backgammon/common_source/save.c b/games/backgammon/common_source/save.c
index a56b22db6da..9918e1e0f43 100644
--- a/games/backgammon/common_source/save.c
+++ b/games/backgammon/common_source/save.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: save.c,v 1.10 2009/10/27 23:59:23 deraadt Exp $ */
+/* $OpenBSD: save.c,v 1.11 2014/11/16 04:49:48 guenther Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -29,8 +29,8 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <ctype.h>
+#include <limits.h>
#include <errno.h>
#include "back.h"
@@ -51,7 +51,7 @@ save(n)
{
int fdesc;
char *fs;
- char fname[MAXPATHLEN];
+ char fname[PATH_MAX];
int r, c, i;
if (n) {
@@ -75,7 +75,7 @@ save(n)
beep();
continue;
}
- if (fs - fname < MAXPATHLEN - 1) {
+ if (fs - fname < sizeof(fname) - 1) {
if (isascii(i)) {
*fs = i;
addch(*fs++);