From 0d6e174e232b3fbcb307596aedc0301b4a30b6fc Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 18 Oct 2004 03:32:16 +0000 Subject: Made zclose() avoid calling close() when fd < 0. --- Src/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/utils.c b/Src/utils.c index 522c8f9c9..f07cd7811 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1117,8 +1117,9 @@ zclose(int fd) coprocin = -1; if (fd == coprocout) coprocout = -1; + return close(fd); } - return close(fd); + return -1; } /* Get a file name relative to $TMPPREFIX which * -- cgit 1.4.1