aboutsummaryrefslogtreecommitdiff
path: root/bin/hostname/hostname.c
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2001-05-20 04:54:15 +0000
committerKris Kennaway <kris@FreeBSD.org>2001-05-20 04:54:15 +0000
commit97dbc8f347d76d9d4e710b2682994a7a3f68319c (patch)
tree14ffd689cafc7b6498a59c9683a3f6431afab530 /bin/hostname/hostname.c
parent961a739a43875eccb9dc5da56e4a0642e923f02b (diff)
downloadsrc-97dbc8f347d76d9d4e710b2682994a7a3f68319c.tar.gz
src-97dbc8f347d76d9d4e710b2682994a7a3f68319c.zip
Silence WARNS=2 and BDECFLAGS on i386 and alpha
MFC After: 1 week
Notes
Notes: svn path=/head/; revision=76877
Diffstat (limited to 'bin/hostname/hostname.c')
-rw-r--r--bin/hostname/hostname.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c
index 94e5d4a72434..4fc5099bb956 100644
--- a/bin/hostname/hostname.c
+++ b/bin/hostname/hostname.c
@@ -53,6 +53,7 @@ static const char rcsid[] =
#include <string.h>
#include <unistd.h>
+int main __P((int, char *[]));
void usage __P((void));
int
@@ -80,10 +81,10 @@ main(argc,argv)
usage();
if (*argv) {
- if (sethostname(*argv, strlen(*argv)))
+ if (sethostname(*argv, (int)strlen(*argv)))
err(1, "sethostname");
} else {
- if (gethostname(hostname, sizeof(hostname)))
+ if (gethostname(hostname, (int)sizeof(hostname)))
err(1, "gethostname");
if (sflag && (p = strchr(hostname, '.')))
*p = '\0';