summaryrefslogtreecommitdiff
path: root/tools/fdtgrep.c
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2021-02-11 03:43:09 +0300
committerSimon Glass <sjg@chromium.org>2021-03-22 09:23:26 +0300
commitac549ac82d1b09fa9b912f64784426dec9052c20 (patch)
treed1ec1e3f019124787c73aa93fa5ba6137d387ce5 /tools/fdtgrep.c
parentf7691a6d736bec7915c227ac14076f9993a27367 (diff)
downloadu-boot-ac549ac82d1b09fa9b912f64784426dec9052c20.tar.xz
tools: fdtgrep: Use unsigned chars for arrays
Otherwise, values over 127 end up prefixed with ffffff. Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/fdtgrep.c')
-rw-r--r--tools/fdtgrep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index e4112b8f69..db512465db 100644
--- a/tools/fdtgrep.c
+++ b/tools/fdtgrep.c
@@ -213,7 +213,7 @@ static void utilfdt_print_data(const char *data, int len)
} else {
printf(" = [");
for (i = 0; i < len; i++)
- printf("%02x%s", *p++, i < len - 1 ? " " : "");
+ printf("%02x%s", (unsigned char)*p++, i < len - 1 ? " " : "");
printf("]");
}
}