summaryrefslogtreecommitdiff
path: root/checks.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-27 08:16:30 -0600
committerDavid Gibson <david@gibson.dropbear.id.au>2018-11-28 09:35:13 +1100
commitf267e674d1452d381bb2f180695801454d3549ad (patch)
tree3a6fd97fc9fb3aff8e0f68c0d4e8b8d6843369e5 /checks.c
parent3616b9a811b66744b4b818c2930462b480ddae44 (diff)
downloaddevice-tree-compiler-f267e674d1452d381bb2f180695801454d3549ad.tar.gz
checks: Fix crash with multiple source annotations
Commit 3616b9a811b6 ("checks: Use source position information for check failures") causes crashes when there's a check message with multiple source annotations. Drop the errant addition to the str pointer left over from the previous version. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'checks.c')
-rw-r--r--checks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/checks.c b/checks.c
index 4dfdf48..4834e44 100644
--- a/checks.c
+++ b/checks.c
@@ -123,7 +123,7 @@ static inline void PRINTF(5, 6) check_msg(struct check *c, struct dt_info *dti,
pos = pos->next;
file_str = srcpos_string(pos);
- str += xasprintf_append(&str, " also defined at %s\n", file_str);
+ xasprintf_append(&str, " also defined at %s\n", file_str);
free(file_str);
}
}