Commit a6b8978c authored by alex chen's avatar alex chen Committed by Tony Luck

pstore: Fix sprintf format specifier in pstore_dump()

We should use sprintf format specifier "%u" instead of "%d" for
argument of type 'unsigned int' in pstore_dump().
Signed-off-by: default avatarAlex Chen <alex.chen@huawei.com>
Reviewed-by: default avatarJoseph Qi <joseph.qi@huawei.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 9d5438f4
...@@ -301,7 +301,7 @@ static void pstore_dump(struct kmsg_dumper *dumper, ...@@ -301,7 +301,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
if (big_oops_buf) { if (big_oops_buf) {
dst = big_oops_buf; dst = big_oops_buf;
hsize = sprintf(dst, "%s#%d Part%d\n", why, hsize = sprintf(dst, "%s#%d Part%u\n", why,
oopscount, part); oopscount, part);
size = big_oops_buf_sz - hsize; size = big_oops_buf_sz - hsize;
...@@ -321,7 +321,7 @@ static void pstore_dump(struct kmsg_dumper *dumper, ...@@ -321,7 +321,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
} }
} else { } else {
dst = psinfo->buf; dst = psinfo->buf;
hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount, hsize = sprintf(dst, "%s#%d Part%u\n", why, oopscount,
part); part);
size = psinfo->bufsize - hsize; size = psinfo->bufsize - hsize;
dst += hsize; dst += hsize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment