summaryrefslogtreecommitdiff
path: root/src/hostname.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-05-10 15:00:00 +0000
committerJim Meyering <jim@meyering.net>2003-05-10 15:00:00 +0000
commitf01fcb05a9b36dc54508a668b2660d1b78854e18 (patch)
treebe94dd7bc23e71860dd761e030006f1482bae9b9 /src/hostname.c
parent9b652d07908093aa22a975843525d2f5abc79161 (diff)
downloadcoreutils-f01fcb05a9b36dc54508a668b2660d1b78854e18.tar.xz
Handle argc < optind.
Diffstat (limited to 'src/hostname.c')
-rw-r--r--src/hostname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hostname.c b/src/hostname.c
index 3f13b072e..ed6d59252 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -1,5 +1,5 @@
/* hostname - set or print the name of current host system
- Copyright (C) 1994-1997, 1999-2002 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997, 1999-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* Jim Meyering <meyering@comco.com> */
+/* Written by Jim Meyering. */
#include <config.h>
#include <stdio.h>
@@ -110,7 +110,7 @@ main (int argc, char **argv)
_("cannot set hostname; this system lacks the functionality"));
#endif
- if (argc == 1)
+ if (argc <= 1)
{
hostname = xgethostname ();
if (hostname == NULL)