提交 ce2ec19c 编写于 作者: S Stefan Brüns 提交者: Simon Glass

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: NStefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: NSimon Glass <sjg@chromium.org>
上级 86167089
......@@ -363,8 +363,8 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp)
next->size = buf.st_size;
if (node)
node->next = next;
if (!head)
head = node;
else
head = next;
}
*headp = head;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册