summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2004-10-18 03:32:16 +0000
committerWayne Davison <wayned@users.sourceforge.net>2004-10-18 03:32:16 +0000
commit0d6e174e232b3fbcb307596aedc0301b4a30b6fc (patch)
tree6d542287ebd41f7a336a92a5f54ea63d2208404b /Src
parent66baaced5d84dce7f1902d80c954a078c1d2456f (diff)
downloadzsh-0d6e174e232b3fbcb307596aedc0301b4a30b6fc.tar.gz
zsh-0d6e174e232b3fbcb307596aedc0301b4a30b6fc.tar.xz
zsh-0d6e174e232b3fbcb307596aedc0301b4a30b6fc.zip
Made zclose() avoid calling close() when fd < 0.
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c3
1 files changed, 2 insertions, 1 deletions
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 *