diff options
author | Youngmin Nam <[email protected]> | 2019-06-10 16:47:07 +0900 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2019-06-12 09:12:27 +0200 |
commit | b314dd49a28a38997aa8f472d02f0631a830d37a (patch) | |
tree | 3343f7426bb70c56ce33651b5a50ad7736d3134c | |
parent | e290e6af1d22c3f5225c9d46faabdde80e27aef2 (diff) |
vsprintf: fix data type of variable in string_nocheck()
This patch fixes data type of precision with int.
The precision is declared as signed int in struct printf_spec.
Link: http://lkml.kernel.org/r/[email protected]
To: <[email protected]>
To: <[email protected]>
To: <[email protected]>
To: <[email protected]>
Signed-off-by: Youngmin Nam <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
-rw-r--r-- | lib/vsprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 2f003cfe340e..25b8f4f040c0 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -598,7 +598,7 @@ static char *string_nocheck(char *buf, char *end, const char *s, struct printf_spec spec) { int len = 0; - size_t lim = spec.precision; + int lim = spec.precision; while (lim--) { char c = *s++; |