diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2008-02-28 20:58:28 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@loeliger.com> | 2008-03-23 08:00:33 -0500 |
commit | 5ac97df149a171d63804a889ffcaa85e0feb400b (patch) | |
tree | 93f56650835cd551e21687641e8bf81d7909a774 /flattree.c | |
parent | a266e5c1e105487795aa2e6fe0b52cfdb8a0a71d (diff) | |
download | dtc-5ac97df149a171d63804a889ffcaa85e0feb400b.zip dtc-5ac97df149a171d63804a889ffcaa85e0feb400b.tar.gz dtc-5ac97df149a171d63804a889ffcaa85e0feb400b.tar.bz2 |
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@gibson.dropbear.id.au>
Diffstat (limited to 'flattree.c')
-rw-r--r-- | flattree.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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", |