Skip to content
Snippets Groups Projects
Commit fd2876bb authored by Luis Gerhorst's avatar Luis Gerhorst
Browse files

du: Reuse name_user buffer for child name

parent 1b5f2252
Branches
No related tags found
No related merge requests found
......@@ -46,7 +46,8 @@ static long iter_dir(uint32_t d_type, size_t namelen, bool match) {
}
int parent_dfd = dfd[depth];
void *name_user = u_iterdents64_buf + depth * PATHLEN;
/* void *name_user = u_iterdents64_buf + depth * PATHLEN; */
void *name_user = u_iterdents64_buf;
if (match) {
if (flags & PRINT_MATCHES) {
write(STDOUT_FILENO, name_user, namelen);
......@@ -84,7 +85,8 @@ static long iter_dir(uint32_t d_type, size_t namelen, bool match) {
}
unsigned long child_depth = depth + 1;
void *child_name_user = u_iterdents64_buf + child_depth * PATHLEN;
/* void *child_name_user = u_iterdents64_buf + child_depth * PATHLEN; */
void *child_name_user = name_user;
curr_depth = child_depth;
dfd[curr_depth] = child_dfd;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment