From 2f8aaaf5e425f2285e028e35a52d0766067ab3fd Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 22 Sep 2009 16:04:13 +0000 Subject: 27286: Made movefd() return the targetfd on success. Added a little more error checking in the callers of movefd(). --- Src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index 21a7b43f6..b807eea08 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1654,14 +1654,14 @@ movefd(int fd) /* * Move fd x to y. If x == -1, fd y is closed. - * Return 0 for success, -1 for failure. + * Returns y for success, -1 for failure. */ /**/ mod_export int redup(int x, int y) { - int ret = 0; + int ret = y; if(x < 0) zclose(y); -- cgit 1.4.1