summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-02-15 07:53:58 +0800
committerMeco Man <[email protected]>2021-02-15 07:53:58 +0800
commitabcb05060332b83dfa5cd7d41f7c1ca15665a1f1 (patch)
treeeafc71f7e78c8f094c379d9c0a1a6dcc4637cbde /components/libc/compilers/dlib
parentf0805a7973ffe62e459da7748cbada62bccf98b9 (diff)
[libc][iar][gcc] 优化remove函数
Diffstat (limited to 'components/libc/compilers/dlib')
-rw-r--r--components/libc/compilers/dlib/syscall_remove.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/libc/compilers/dlib/syscall_remove.c b/components/libc/compilers/dlib/syscall_remove.c
index e7f0268b1b..ca949a5bc1 100644
--- a/components/libc/compilers/dlib/syscall_remove.c
+++ b/components/libc/compilers/dlib/syscall_remove.c
@@ -16,9 +16,9 @@
#pragma module_name = "?remove"
int remove(const char *val)
{
-#ifdef RT_USING_DFS
- dfs_file_unlink(val);
+#ifndef RT_USING_DFS
+ return -1;
+#else
+ return unlink(filename);
#endif
-
- return 0;
}