Skip to contentSkip to conversation

vsprintf: fix data type of variable in string_nocheck()

PATCH In review 남영민 3 participants 3 messages Jun 10, 2019 – Jun 12, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20190610074708epcas2p3dcbdc49d114c544c1de721666d574b43@epcas2p3.samsung.com

남영민

author
#1 lore raw

PATCH 1/1 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.

---
 lib/vsprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/vsprintf.c +1 -1
index 63937044c57d..cd0cd9279b12 100644
@@ -599,7 +599,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++;
Signature · 1 line
2.21.0