X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fremove.c;h=e147ba251440d8e04d8585604c8190891b1643ac;hb=ebee8c2b477807fe58fd35d35783633ea08b049c;hp=fc12f7c10578d2f2f05bb2e7a6753dbe626e2ed7;hpb=0b240ccf523b9af23dd1efa78274f397fcc90cdd;p=musl 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; }