summaryrefslogtreecommitdiff
path: root/fstree.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2018-11-14 15:24:49 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2018-11-14 15:24:49 +1100
commita3143fafbf83868748c99aa14daf274de5549826 (patch)
tree20ba91881fe53edc26d96ae5b80d0528a924b8e4 /fstree.c
parent403cc79f06a135aee00f35cea975f068a72dbd92 (diff)
downloaddevice-tree-compiler-a3143fafbf83868748c99aa14daf274de5549826.tar.gz
Revert "annotations: add positions"
This reverts commit baa1d2cf7894a32bf2f640ef40ebce561b2df565. Turns out this introduced memory badness. valgrind picks it up on x86, but it straight out SEGVs on x86. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'fstree.c')
-rw-r--r--fstree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fstree.c b/fstree.c
index 1e7eeba..ae7d06c 100644
--- a/fstree.c
+++ b/fstree.c
@@ -34,7 +34,7 @@ static struct node *read_fstree(const char *dirname)
if (!d)
die("Couldn't opendir() \"%s\": %s\n", dirname, strerror(errno));
- tree = build_node(NULL, NULL, NULL);
+ tree = build_node(NULL, NULL);
while ((de = readdir(d)) != NULL) {
char *tmpname;
@@ -60,8 +60,7 @@ static struct node *read_fstree(const char *dirname)
} else {
prop = build_property(xstrdup(de->d_name),
data_copy_file(pfile,
- st.st_size),
- NULL);
+ st.st_size));
add_property(tree, prop);
fclose(pfile);
}