]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Handle argc < optind.
authorJim Meyering <jim@meyering.net>
Sat, 10 May 2003 14:58:15 +0000 (14:58 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 10 May 2003 14:58:15 +0000 (14:58 +0000)
src/tty.c

index 46c20a7709f5b70d0bc233f782ef6e4d82b3eb9c..2b8457cb4098c4d230e9ff4450176b2b700486bc 100644 (file)
--- a/src/tty.c
+++ b/src/tty.c
@@ -1,5 +1,5 @@
 /* tty -- print the path of the terminal connected to standard input
-   Copyright (C) 1990-2002 Free Software Foundation, Inc.
+   Copyright (C) 1990-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
@@ -108,7 +108,7 @@ main (int argc, char **argv)
        }
     }
 
-  if (optind != argc)
+  if (optind < argc)
     error (0, 0, _("ignoring all arguments"));
 
   tty = ttyname (0);