1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-12 10:00:56 +01:00

27286: Made movefd() return the targetfd on success. Added

a little more error checking in the callers of movefd().
This commit is contained in:
Wayne Davison 2009-09-22 16:04:13 +00:00
parent 51409732d0
commit 2f8aaaf5e4
4 changed files with 31 additions and 19 deletions

View file

@ -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);