提交 abcb0506 编写于 作者: mysterywolf's avatar mysterywolf

[libc][iar][gcc] 优化remove函数

上级 f0805a79
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#pragma module_name = "?remove" #pragma module_name = "?remove"
int remove(const char *val) int remove(const char *val)
{ {
#ifdef RT_USING_DFS #ifndef RT_USING_DFS
dfs_file_unlink(val); return -1;
#else
return unlink(filename);
#endif #endif
return 0;
} }
...@@ -196,12 +196,9 @@ int ...@@ -196,12 +196,9 @@ int
_unlink_r(struct _reent *ptr, const char *file) _unlink_r(struct _reent *ptr, const char *file)
{ {
#ifndef RT_USING_DFS #ifndef RT_USING_DFS
return 0; return -1;
#else #else
int rc; return unlink(file);
rc = unlink(file);
return rc;
#endif #endif
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册