summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ftp/util.c6
-rw-r--r--usr.bin/netstat/inet.c8
-rw-r--r--usr.bin/netstat/inet6.c8
-rw-r--r--usr.bin/w/w.c6
4 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c
index fe8d815efdd..4600bc5e8bf 100644
--- a/usr.bin/ftp/util.c
+++ b/usr.bin/ftp/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.27 2002/02/16 21:27:46 millert Exp $ */
+/* $OpenBSD: util.c,v 1.28 2002/02/19 18:38:01 mpech Exp $ */
/* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: util.c,v 1.27 2002/02/16 21:27:46 millert Exp $";
+static char rcsid[] = "$OpenBSD: util.c,v 1.28 2002/02/19 18:38:01 mpech Exp $";
#endif /* not lint */
/*
@@ -242,7 +242,7 @@ login(host, user, pass)
else
user = pw->pw_name;
}
- gethostname(hostname, MAXHOSTNAMELEN);
+ gethostname(hostname, sizeof(hostname));
#ifndef DONT_CHEAT_ANONPASS
/*
* Every anonymous FTP server I've encountered
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index 4c53d483109..bd028ecd526 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet.c,v 1.56 2002/02/16 21:27:50 millert Exp $ */
+/* $OpenBSD: inet.c,v 1.57 2002/02/19 18:38:02 mpech Exp $ */
/* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94";
#else
-static char *rcsid = "$OpenBSD: inet.c,v 1.56 2002/02/16 21:27:50 millert Exp $";
+static char *rcsid = "$OpenBSD: inet.c,v 1.57 2002/02/19 18:38:02 mpech Exp $";
#endif
#endif /* not lint */
@@ -642,12 +642,12 @@ inetname(inp)
static char line[50];
struct hostent *hp;
struct netent *np;
- static char domain[MAXHOSTNAMELEN + 1];
+ static char domain[MAXHOSTNAMELEN];
static int first = 1;
if (first && !nflag) {
first = 0;
- if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
+ if (gethostname(domain, sizeof(domain)) == 0 &&
(cp = strchr(domain, '.')))
(void) strcpy(domain, cp + 1);
else
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index 538b597795d..aed8ffcc1b2 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet6.c,v 1.18 2002/02/16 21:27:50 millert Exp $ */
+/* $OpenBSD: inet6.c,v 1.19 2002/02/19 18:38:02 mpech Exp $ */
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
/*
* Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94";
#else
-/*__RCSID("$OpenBSD: inet6.c,v 1.18 2002/02/16 21:27:50 millert Exp $");*/
+/*__RCSID("$OpenBSD: inet6.c,v 1.19 2002/02/19 18:38:02 mpech Exp $");*/
/*__RCSID("KAME Id: inet6.c,v 1.10 2000/02/09 10:49:31 itojun Exp");*/
#endif
#endif /* not lint */
@@ -1046,7 +1046,7 @@ inet6name(in6p)
char *cp;
static char line[NI_MAXHOST];
struct hostent *hp;
- static char domain[MAXHOSTNAMELEN + 1];
+ static char domain[MAXHOSTNAMELEN];
static int first = 1;
char hbuf[NI_MAXHOST];
struct sockaddr_in6 sin6;
@@ -1058,7 +1058,7 @@ inet6name(in6p)
if (first && !nflag) {
first = 0;
- if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
+ if (gethostname(domain, sizeof(domain)) == 0 &&
(cp = index(domain, '.')))
(void) strcpy(domain, cp + 1);
else
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 {