From b8724a0a95054da51b0a8bfca19d6d2b2662609f Mon Sep 17 00:00:00 2001 From: kleink Date: Fri, 10 Sep 1999 10:47:56 +0000 Subject: Use STD*_FILENO. --- wump/wump.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wump') diff --git a/wump/wump.c b/wump/wump.c index 638bb060..93fc6c5f 100644 --- a/wump/wump.c +++ b/wump/wump.c @@ -1,4 +1,4 @@ -/* $NetBSD: wump.c,v 1.10 1999/09/09 17:30:20 jsm Exp $ */ +/* $NetBSD: wump.c,v 1.11 1999/09/10 10:47:56 kleink Exp $ */ /* * Copyright (c) 1989, 1993 @@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)wump.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: wump.c,v 1.10 1999/09/09 17:30:20 jsm Exp $"); +__RCSID("$NetBSD: wump.c,v 1.11 1999/09/10 10:47:56 kleink Exp $"); #endif #endif /* not lint */ @@ -746,7 +746,7 @@ puff of greasy black smoke! (poof)\n"); return; } - if (!isatty(1)) + if (!isatty(STDOUT_FILENO)) pager = "cat"; else { if (!(pager = getenv("PAGER")) || (*pager == 0)) @@ -756,7 +756,7 @@ puff of greasy black smoke! (poof)\n"); case 0: /* child */ if ((fd = open(_PATH_WUMPINFO, O_RDONLY)) == -1) err(1, "open %s", _PATH_WUMPINFO); - if (dup2(fd, 0) == -1) + if (dup2(fd, STDIN_FILENO) == -1) err(1, "dup2"); (void)execl("/bin/sh", "sh", "-c", pager, NULL); err(1, "exec sh -c %s", pager); -- cgit v1.2.3-56-ge451