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

This commit is contained in:
Meco Man 2021-02-15 07:53:58 +08:00
parent f0805a7973
commit abcb050603
2 changed files with 6 additions and 9 deletions

View File

@ -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;
}

View File

@ -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
}