diff options
author | Eric Blake <ebb9@byu.net> | 2009-12-07 10:17:07 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-12-07 20:56:47 -0700 |
commit | a1afba1b2122388e9a120b6a1f011367e6db1518 (patch) | |
tree | 72b3daa658c9fcebead73f296090a8e4f2c30ab2 /lib/cloexec.c | |
parent | 73da5fb7e129f1fa540e040582cda710b8c2cce4 (diff) | |
download | gnulib-a1afba1b2122388e9a120b6a1f011367e6db1518.tar.gz |
unistd-safer: add unit test
Add more unit tests. Meanwhile, fix compilation error on mingw when
testing unistd-safer and fchdir together; and avoid gcc warning on
platforms without setmode.
* modules/unistd-safer-tests: New file.
* tests/test-dup-safer.c: Likewise.
* tests/test-cloexec.c (setmode): Avoid compiler warning.
* tests/test-dup2.c (setmode): Likewise.
* lib/cloexec.c (dup_cloexec): Fix mingw compile error.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib/cloexec.c')
-rw-r--r-- | lib/cloexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cloexec.c b/lib/cloexec.c index 57e0be59e2..18985cb237 100644 --- a/lib/cloexec.c +++ b/lib/cloexec.c @@ -128,7 +128,7 @@ dup_cloexec (int fd) # if REPLACE_FCHDIR if (0 <= nfd) - result = _gl_register_dup (fd, nfd); + nfd = _gl_register_dup (fd, nfd); # endif return nfd; |