diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/nt.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -287,4 +287,4 @@ redirect (int sfd, char const *name) - fd = open (name, sfd ? (O_WRONLY | O_TRUNC) : O_RDONLY); - if (!fd) + fd = open (name, sfd ? (O_CREAT | O_TRUNC | O_WRONLY) : O_RDONLY, 0644); + if (fd == -1) { @@ -293,3 +293,3 @@ redirect (int sfd, char const *name) } - if (dup2 (fd, sfd)) + if (dup2 (fd, sfd) == -1) { |