summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-11-01 06:53:48 +0000
committerderaadt <deraadt@openbsd.org>1996-11-01 06:53:48 +0000
commit50d6eb5b629f10726ee5b76e6fecfe71d0fe584b (patch)
tree4890b061d122af2f79f140ca2b7ddb7dd2231cfa
parentRevert obvious comment (diff)
downloadwireguard-openbsd-50d6eb5b629f10726ee5b76e6fecfe71d0fe584b.tar.xz
wireguard-openbsd-50d6eb5b629f10726ee5b76e6fecfe71d0fe584b.zip
gethostname correctly
-rw-r--r--usr.sbin/rwhod/rwhod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c
index 43f4239f692..7f2db8784f1 100644
--- a/usr.sbin/rwhod/rwhod.c
+++ b/usr.sbin/rwhod/rwhod.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$Id: rwhod.c,v 1.4 1996/11/01 06:53:25 imp Exp $";
+static char rcsid[] = "$Id: rwhod.c,v 1.5 1996/11/01 06:53:48 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -141,7 +141,7 @@ main(argc, argv)
/*
* Establish host name as returned by system.
*/
- if (gethostname(myname, sizeof(myname) - 1) < 0) {
+ if (gethostname(myname, sizeof(myname)) < 0) {
syslog(LOG_ERR, "gethostname: %m");
exit(1);
}