From c22e9cc693a6271533740abd9be1bf918a40b0b3 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Mon, 26 Mar 2018 18:33:49 +0800 Subject: redir: Fix typo in noclobber code The noclobber code has a typo in it that causes it to fail. This patch fixes it. Reported-by: Denys Vlasenko Signed-off-by: Herbert Xu --- src/redir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redir.c b/src/redir.c index f96a76b..71b0f77 100644 --- a/src/redir.c +++ b/src/redir.c @@ -192,7 +192,7 @@ openredirect(union node *redir) } else if (!S_ISREG(sb.st_mode)) { if ((f = open64(fname, O_WRONLY, 0666)) < 0) goto ecreate; - if (fstat64(f, &sb) < 0 && S_ISREG(sb.st_mode)) { + if (!fstat64(f, &sb) && S_ISREG(sb.st_mode)) { close(f); errno = EEXIST; goto ecreate; -- cgit 1.4.1 td> dontfiles
summary refs log tree commit diff
Commit message (Collapse)Author
12 hoursAdd The Girl Who Was Convinced...June McEnroe
Not much there. The illustrations are very nice though.
31 hoursAdd photos from May 31June McEnroe
32 hoursUse monospace on photo pagesJune McEnroe
32 hoursPut lens and (future) film at the tops of photo pagesJune McEnroe
2024-05-22Remove use of sysexits.hJune McEnroe
2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe
2024-05-21Fix = precedence in whenJune McEnroe