This commit is contained in:
Your Name 2024-04-12 19:03:50 +03:00
parent 57e466888a
commit 4d278767ef
1 changed files with 2 additions and 1 deletions

View File

@ -67,6 +67,7 @@ struct d_node *stat_file(char *filename, int lfile) {
return file;
}
/* Busybox code */
struct d_node **list(const char *path, size_t *nfiles, int *ret) {
DIR *dp = opendir(path);
if (dp == NULL) {
@ -109,7 +110,7 @@ struct d_node **list(const char *path, size_t *nfiles, int *ret) {
return NULL;
}
for (int i = 0; i < *nfiles; i++) {
for (size_t i = 0; i < *nfiles; i++) {
dir[i] = dn;
dn = dn->next;
}