diff options
author | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-02-19 18:38:03 +0000 |
---|---|---|
committer | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-02-19 18:38:03 +0000 |
commit | 1b7ac57ccea5e902a5153d8337c8476912eba485 (patch) | |
tree | 9ca417136ca87ef21c45e61611e84d935387b2a5 /usr.bin/w | |
parent | 210f400c2f86223b592e3c43ba8ec1e96cdeec91 (diff) |
Fix gethostname() usage.
deraadt@ ok
Diffstat (limited to 'usr.bin/w')
-rw-r--r-- | usr.bin/w/w.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 7b99d2a9ccc..f3acb102a78 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -1,4 +1,4 @@ -/* $OpenBSD: w.c,v 1.35 2002/02/16 21:27:58 millert Exp $ */ +/* $OpenBSD: w.c,v 1.36 2002/02/19 18:38:02 mpech Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94"; #else -static char *rcsid = "$OpenBSD: w.c,v 1.35 2002/02/16 21:27:58 millert Exp $"; +static char *rcsid = "$OpenBSD: w.c,v 1.36 2002/02/19 18:38:02 mpech Exp $"; #endif #endif /* not lint */ @@ -306,7 +306,7 @@ main(argc, argv) } if (!nflag) { - if (gethostname(domain, sizeof(domain) - 1) < 0 || + if (gethostname(domain, sizeof(domain)) < 0 || (p = strchr(domain, '.')) == 0) domain[0] = '\0'; else { |