[Crosstoolchain-logs] [device-tree-compiler] 256/357: dtc: Use for_each_marker_of_type in asm_emit_data()

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:20 UTC 2016


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

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

commit 5ac97df149a171d63804a889ffcaa85e0feb400b
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Thu Feb 28 20:58:28 2008 +1100

    dtc: Use for_each_marker_of_type in asm_emit_data()
    
    For no good reason, asm_emit_data() open-codes the equivalent of the
    for_each_marker_of_type macro.  Use the macro instead.
    
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 flattree.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/flattree.c b/flattree.c
index 6f43a89..41cb740 100644
--- a/flattree.c
+++ b/flattree.c
@@ -162,14 +162,10 @@ static void asm_emit_data(void *e, struct data d)
 {
 	FILE *f = e;
 	int off = 0;
-	struct marker *m;
+	struct marker *m = d.markers;
 
-	m = d.markers;
-	while (m) {
-		if (m->type == LABEL)
-			emit_offset_label(f, m->ref, m->offset);
-		m = m->next;
-	}
+	for_each_marker_of_type(m, LABEL)
+		emit_offset_label(f, m->ref, m->offset);
 
 	while ((d.len - off) >= sizeof(u32)) {
 		fprintf(f, "\t.long\t0x%x\n",

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