mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +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 force = false;
|
||||
FAR char *fullpath;
|
||||
char buf[PATH_MAX];
|
||||
struct stat stat;
|
||||
int ret = ERROR;
|
||||
int c;
|
||||
|
|
@ -2234,8 +2233,7 @@ int cmd_rm(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
|
|||
{
|
||||
if (recursive)
|
||||
{
|
||||
strlcpy(buf, fullpath, PATH_MAX);
|
||||
ret = unlink_recursive(buf, &stat);
|
||||
ret = unlink_recursive(fullpath, &stat);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue