mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-13 00:40:11 +00:00
nshlib: Remove the unnecessary temp path buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
903fbe41e9
commit
131d50ae9d
1 changed files with 1 additions and 3 deletions
|
|
@ -2191,7 +2191,6 @@ int cmd_rm(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
|
||||||
bool recursive = false;
|
bool recursive = false;
|
||||||
bool force = false;
|
bool force = false;
|
||||||
FAR char *fullpath;
|
FAR char *fullpath;
|
||||||
char buf[PATH_MAX];
|
|
||||||
struct stat stat;
|
struct stat stat;
|
||||||
int ret = ERROR;
|
int ret = ERROR;
|
||||||
int c;
|
int c;
|
||||||
|
|
@ -2234,8 +2233,7 @@ int cmd_rm(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
|
||||||
{
|
{
|
||||||
if (recursive)
|
if (recursive)
|
||||||
{
|
{
|
||||||
strlcpy(buf, fullpath, PATH_MAX);
|
ret = unlink_recursive(fullpath, &stat);
|
||||||
ret = unlink_recursive(buf, &stat);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue