projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b240cc
)
fix messed-up errno if remove fails for a non-EISDIR reason
author
Rich Felker
<dalias@aerifal.cx>
Tue, 29 Mar 2011 12:25:59 +0000
(08:25 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 29 Mar 2011 12:25:59 +0000
(08:25 -0400)
src/stdio/remove.c
patch
|
blob
|
history
diff --git
a/src/stdio/remove.c
b/src/stdio/remove.c
index fc12f7c10578d2f2f05bb2e7a6753dbe626e2ed7..e147ba251440d8e04d8585604c8190891b1643ac 100644
(file)
--- a/
src/stdio/remove.c
+++ b/
src/stdio/remove.c
@@
-4,6
+4,6
@@
int remove(const char *path)
{
- return (syscall(SYS_unlink, path) && errno == EISDIR)
-
? syscall(SYS_rmdir, path) : 0
;
+ int r = syscall(SYS_unlink, path);
+
return (r && errno == EISDIR) ? syscall(SYS_rmdir, path) : r
;
}