diff options
author | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2021-02-11 03:43:09 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-22 09:23:26 +0300 |
commit | ac549ac82d1b09fa9b912f64784426dec9052c20 (patch) | |
tree | d1ec1e3f019124787c73aa93fa5ba6137d387ce5 | |
parent | f7691a6d736bec7915c227ac14076f9993a27367 (diff) | |
download | u-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>
-rw-r--r-- | tools/fdtgrep.c | 2 |
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("]"); } } |