From 054f35c2222ef251bc2877814cf7bf5ff6038166 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 28 Mar 1997 15:24:41 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- bin/pwd/pwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/pwd') diff --git a/bin/pwd/pwd.c b/bin/pwd/pwd.c index d80423a..63b6868 100644 --- a/bin/pwd/pwd.c +++ b/bin/pwd/pwd.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: pwd.c,v 1.5 1997/02/22 14:05:16 peter Exp $ */ #ifndef lint @@ -65,7 +65,7 @@ main(argc, argv) * there's no way to display a logical path after forking. We don't * document either flag, only adding -P for future portability. */ - while ((ch = getopt(argc, argv, "P")) != EOF) + while ((ch = getopt(argc, argv, "P")) != -1) switch (ch) { case 'P': break; -- cgit v1.1