From c80b5ae4090c6ed48e99644b98e7a1cfa4e1b133 Mon Sep 17 00:00:00 2001 From: explorer Date: Wed, 29 Jan 1997 10:30:14 +0000 Subject: [PATCH] Doh! MAXHOSTNAMELEN, not MAXHOSTNAME --- libexec/talkd/talkd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index 29b8224219f6..bc5244b7efac 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)talkd.c 5.8 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: talkd.c,v 1.3 1997/01/29 03:21:01 explorer Exp $"; +static char rcsid[] = "$Id: talkd.c,v 1.4 1997/01/29 10:30:14 explorer Exp $"; #endif /* not lint */ /* @@ -50,6 +50,8 @@ static char rcsid[] = "$Id: talkd.c,v 1.3 1997/01/29 03:21:01 explorer Exp $"; */ #include #include +#include + #include #include #include @@ -69,7 +71,7 @@ int debug = 0; void timeout(); long lastmsgtime; -char hostname[MAXHOSTNAME + 1]; +char hostname[MAXHOSTNAMELEN + 1]; #define TIMEOUT 30 #define MAXIDLE 120 @@ -90,7 +92,7 @@ main(argc, argv) syslog(LOG_ERR, "gethostname: %m"); _exit(1); } - hostname[MAXHOSTNAME] = 0; /* ensure null termination */ + hostname[MAXHOSTNAMELEN] = 0; /* ensure null termination */ if (chdir(_PATH_DEV) < 0) { syslog(LOG_ERR, "chdir: %s: %m", _PATH_DEV); _exit(1);