author | Rich Felker <dalias@aerifal.cx> | 2011年03月29日 08:25:59 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011年03月29日 08:25:59 -0400 |
commit | 9646e4d024c05332c9653419abd6c41fdd48a33b (patch) | |
tree | e51dcec0116e9fc0c151e8096f5fa782fda053ba /src | |
parent | 0b240ccf523b9af23dd1efa78274f397fcc90cdd (diff) | |
download | musl-9646e4d024c05332c9653419abd6c41fdd48a33b.tar.gz |
-rw-r--r-- | src/stdio/remove.c | 4 |
diff --git a/src/stdio/remove.c b/src/stdio/remove.c index fc12f7c1..e147ba25 100644 --- 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; } |