[Crosstoolchain-logs] [device-tree-compiler] 132/198: Tweak code to display cell values

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:07:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.

commit c78ca72e1e89714a7a62a85035e5c505c8ba51f0
Author: Simon Glass <sjg at chromium.org>
Date:   Wed Jun 18 01:00:23 2014 -0600

    Tweak code to display cell values
    
    Move the division out of the loop; this seems slightly cleaner.
    
    Signed-off-by: Simon Glass <sjg at chromium.org>
---
 util.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/util.c b/util.c
index 1ce8b97..9d65226 100644
--- a/util.c
+++ b/util.c
@@ -371,9 +371,9 @@ void utilfdt_print_data(const char *data, int len)
 		const uint32_t *cell = (const uint32_t *)data;
 
 		printf(" = <");
-		for (i = 0; i < len; i += 4)
-			printf("0x%08x%s", fdt32_to_cpu(cell[i / 4]),
-			       i < (len - 4) ? " " : "");
+		for (i = 0, len /= 4; i < len; i++)
+			printf("0x%08x%s", fdt32_to_cpu(cell[i]),
+			       i < (len - 1) ? " " : "");
 		printf(">");
 	} else {
 		printf(" = [");

-- 
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