Code cleanup
This commit is contained in:
parent
a65a1a5d5c
commit
bd748050e2
4
src/rm.c
4
src/rm.c
|
@ -97,7 +97,7 @@ static int _rm_do_recursive(Prefs * prefs, char * file)
|
||||||
{
|
{
|
||||||
DIR * dir;
|
DIR * dir;
|
||||||
struct dirent * de;
|
struct dirent * de;
|
||||||
int len = strlen(file) + 2;
|
size_t len = strlen(file) + 2;
|
||||||
char * path;
|
char * path;
|
||||||
char * p;
|
char * p;
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ static int _rm_do_recursive(Prefs * prefs, char * file)
|
||||||
return _rm_error("malloc", 2);
|
return _rm_error("malloc", 2);
|
||||||
}
|
}
|
||||||
path = p;
|
path = p;
|
||||||
strcpy(&path[len-1], de->d_name);
|
strcpy(&path[len - 1], de->d_name);
|
||||||
if(_rm_do(prefs, path) != 0)
|
if(_rm_do(prefs, path) != 0)
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user