musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stdio/remove.c 4
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;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月11日 21:08:14 +0000

AltStyle によって変換されたページ (->オリジナル) /