Skip to content
Snippets Groups Projects
Commit ce2ec19c authored by Stefan Brüns's avatar Stefan Brüns Committed by Simon Glass
Browse files

sandbox/fs: Make linking of nodes in os_dirent_ls more obvious


Previously, after reading/creating the second dirent, the second entry
would be chained to the first entry and the first entry would be linked
to head. Instead, immediately link the first entry to head.

Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 86167089
No related branches found
No related tags found
No related merge requests found
...@@ -363,8 +363,8 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp) ...@@ -363,8 +363,8 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp)
next->size = buf.st_size; next->size = buf.st_size;
if (node) if (node)
node->next = next; node->next = next;
if (!head) else
head = node; head = next;
} }
*headp = head; *headp = head;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment