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>
This commit is contained in:
Samuel Dionne-Riel 2021-02-10 19:43:09 -05:00 committed by Simon Glass
parent f7691a6d73
commit ac549ac82d

View File

@ -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("]");
}
}