diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-04-02 13:34:57 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-04-02 13:34:57 +0200 |
commit | 355ec353be14f33f69fe3e3992ab5a815b3a01a6 (patch) | |
tree | c6056dce95b4021710d2e9315d076407036bf775 | |
parent | c4c2012284c3a3a45843e9400379c84855d853ef (diff) | |
download | busybox-w32-355ec353be14f33f69fe3e3992ab5a815b3a01a6.tar.gz busybox-w32-355ec353be14f33f69fe3e3992ab5a815b3a01a6.tar.bz2 busybox-w32-355ec353be14f33f69fe3e3992ab5a815b3a01a6.zip |
ash: redir: Fix typo in noclobber code
Upstream commit "redir: Fix typo in noclobber code"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 70a278f42..35ea58f3a 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -5391,7 +5391,7 @@ openredirect(union node *redir) | |||
5391 | f = open(fname, O_WRONLY, 0666); | 5391 | f = open(fname, O_WRONLY, 0666); |
5392 | if (f < 0) | 5392 | if (f < 0) |
5393 | goto ecreate; | 5393 | goto ecreate; |
5394 | if (fstat(f, &sb) < 0 && S_ISREG(sb.st_mode)) { | 5394 | if (!fstat(f, &sb) && S_ISREG(sb.st_mode)) { |
5395 | close(f); | 5395 | close(f); |
5396 | errno = EEXIST; | 5396 | errno = EEXIST; |
5397 | goto ecreate; | 5397 | goto ecreate; |