diff options
| author | Meco Man <[email protected]> | 2021-02-15 07:53:58 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-02-15 07:53:58 +0800 |
| commit | abcb05060332b83dfa5cd7d41f7c1ca15665a1f1 (patch) | |
| tree | eafc71f7e78c8f094c379d9c0a1a6dcc4637cbde /components/libc/compilers/newlib | |
| parent | f0805a7973ffe62e459da7748cbada62bccf98b9 (diff) | |
[libc][iar][gcc] 优化remove函数
Diffstat (limited to 'components/libc/compilers/newlib')
| -rw-r--r-- | components/libc/compilers/newlib/syscalls.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/libc/compilers/newlib/syscalls.c b/components/libc/compilers/newlib/syscalls.c index 193080c926..f7dd922e1b 100644 --- a/components/libc/compilers/newlib/syscalls.c +++ b/components/libc/compilers/newlib/syscalls.c @@ -196,12 +196,9 @@ int _unlink_r(struct _reent *ptr, const char *file) { #ifndef RT_USING_DFS - return 0; + return -1; #else - int rc; - - rc = unlink(file); - return rc; + return unlink(file); #endif } |
