Skip to content

Commit f6ab738

Browse files
Luo Yifanmhiramat
Luo Yifan
authored andcommitted
tools/bootconfig: Fix the wrong format specifier
Use '%u' instead of '%d' for unsigned int. Link: https://lore.kernel.org/all/[email protected]/ Fixes: 9737800 ("tools/bootconfig: Suppress non-error messages") Signed-off-by: Luo Yifan <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent ffd294d commit f6ab738

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/bootconfig/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static int load_xbc_from_initrd(int fd, char **buf)
226226
/* Wrong Checksum */
227227
rcsum = xbc_calc_checksum(*buf, size);
228228
if (csum != rcsum) {
229-
pr_err("checksum error: %d != %d\n", csum, rcsum);
229+
pr_err("checksum error: %u != %u\n", csum, rcsum);
230230
return -EINVAL;
231231
}
232232

@@ -395,7 +395,7 @@ static int apply_xbc(const char *path, const char *xbc_path)
395395
xbc_get_info(&ret, NULL);
396396
printf("\tNumber of nodes: %d\n", ret);
397397
printf("\tSize: %u bytes\n", (unsigned int)size);
398-
printf("\tChecksum: %d\n", (unsigned int)csum);
398+
printf("\tChecksum: %u\n", (unsigned int)csum);
399399

400400
/* TODO: Check the options by schema */
401401
xbc_exit();

0 commit comments

Comments
 (0)