From: Samuel Dionne-Riel Date: Thu, 11 Feb 2021 00:43:09 +0000 (-0500) Subject: tools: fdtgrep: Use unsigned chars for arrays X-Git-Tag: v2025.01-rc5-pxa1908~1941^2~4^2~115 X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=ac549ac82d1b09fa9b912f64784426dec9052c20;p=u-boot.git tools: fdtgrep: Use unsigned chars for arrays Otherwise, values over 127 end up prefixed with ffffff. Signed-off-by: Samuel Dionne-Riel Cc: Simon Glass Reviewed-by: Simon Glass --- 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("]"); } }