summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stdio/remove.c4
1 files changed, 2 insertions, 2 deletions
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;
}