diff options
author | Simon Glass <sjg@chromium.org> | 2014-06-18 01:00:23 -0600 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2014-06-18 21:02:51 +1000 |
commit | c78ca72e1e89714a7a62a85035e5c505c8ba51f0 (patch) | |
tree | 2ab3d9f33bd6bc27543a2e0f03b970b3c450972b /util.c | |
parent | dfcfb7f169c361e395e817f33381981c7fdf9539 (diff) | |
download | dtc-c78ca72e1e89714a7a62a85035e5c505c8ba51f0.zip dtc-c78ca72e1e89714a7a62a85035e5c505c8ba51f0.tar.gz dtc-c78ca72e1e89714a7a62a85035e5c505c8ba51f0.tar.bz2 |
Tweak code to display cell values
Move the division out of the loop; this seems slightly cleaner.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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(" = ["); |