diff options
author | alex chen <alex.chen@huawei.com> | 2015-01-16 15:52:03 -0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2015-01-16 16:01:29 -0800 |
commit | a6b8978c54b771308f6f1692b9735ac0bb087cc2 (patch) | |
tree | 002e14ca7c7896bc0a987b0e5f2cf04f4cf37e70 /fs/pstore | |
parent | 9d5438f462abd6398cdb7b3211bdcec271873a3b (diff) | |
download | linux-a6b8978c54b771308f6f1692b9735ac0bb087cc2.tar.bz2 |
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: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'fs/pstore')
-rw-r--r-- | fs/pstore/platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 15ee78c5020b..c4c9a10c5760 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -301,7 +301,7 @@ static void pstore_dump(struct kmsg_dumper *dumper, if (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); size = big_oops_buf_sz - hsize; @@ -321,7 +321,7 @@ static void pstore_dump(struct kmsg_dumper *dumper, } } else { dst = psinfo->buf; - hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount, + hsize = sprintf(dst, "%s#%d Part%u\n", why, oopscount, part); size = psinfo->bufsize - hsize; dst += hsize; |