From 8a7f744635f353e8d047c1b0cd97d0237e5a6b88 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 10 May 2003 14:58:15 +0000 Subject: Handle argc < optind. --- src/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tty.c') diff --git a/src/tty.c b/src/tty.c index 46c20a770..2b8457cb4 100644 --- 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); -- cgit v1.2.3-54-g00ecf