[Crosstoolchain-logs] [device-tree-compiler] 39/58: tests: Make realloc_fdt() really allocate *fdt
Vagrant Cascadian
vagrant at moszumanska.debian.org
Mon Sep 25 16:23:48 UTC 2017
This is an automated email from the git hooks/post-receive script.
vagrant pushed a commit to branch debian/master
in repository device-tree-compiler.
commit d922ecdd017bc4bc81864714b0427b22de594ae5
Author: Nicolas Iooss <nicolas.iooss_linux at m4x.org>
Date: Sat Mar 4 14:26:45 2017 +0100
tests: Make realloc_fdt() really allocate *fdt
This bug has been found by using clang Static Analyzer: it reported that
the value stored to fdt was never read.
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux at m4x.org>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
tests/sw_tree1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/sw_tree1.c b/tests/sw_tree1.c
index 6d4c531..4887dc3 100644
--- a/tests/sw_tree1.c
+++ b/tests/sw_tree1.c
@@ -42,14 +42,14 @@ static void realloc_fdt(void **fdt, size_t *size, bool created)
switch (alloc_mode) {
case FIXED:
if (!(*fdt))
- fdt = xmalloc(*size);
+ *fdt = xmalloc(*size);
else
FAIL("Ran out of space");
return;
case RESIZE:
if (!(*fdt)) {
- fdt = xmalloc(SPACE);
+ *fdt = xmalloc(SPACE);
} else if (*size < SPACE) {
*size += 1;
fdt_resize(*fdt, *fdt, *size);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list