projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4c2012
)
ash: redir: Fix typo in noclobber code
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 2 Apr 2018 11:34:57 +0000
(13:34 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 2 Apr 2018 11:34:57 +0000
(13:34 +0200)
Upstream commit "redir: Fix typo in noclobber code"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index 70a278f42e34b37a6c65c805a0e6a3f5b7736fc9..35ea58f3aa361976cce76a7dadd0742db5dbb3dc 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-5391,7
+5391,7
@@
openredirect(union node *redir)
f = open(fname, O_WRONLY, 0666);
if (f < 0)
goto ecreate;
- if (
fstat(f, &sb) < 0
&& S_ISREG(sb.st_mode)) {
+ if (
!fstat(f, &sb)
&& S_ISREG(sb.st_mode)) {
close(f);
errno = EEXIST;
goto ecreate;