vsprintf:fix: Change type returned by ustrtoul

The ustrtoul shall convert string defined size (e.g. 1GiB) to unsigned
long type (as its name implies).

Up till now it had returned int, which might cause problems with large
numbers (GiB range), when interpreted as U2 signed numbers.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
This commit is contained in:
Lukasz Majewski 2012-12-11 11:09:42 +01:00 committed by Tom Rini
parent caddc17f30
commit 3ec44111aa
2 changed files with 2 additions and 2 deletions

View file

@ -103,7 +103,7 @@ long simple_strtol(const char *cp, char **endp, unsigned int base)
return simple_strtoul(cp, endp, base);
}
int ustrtoul(const char *cp, char **endp, unsigned int base)
unsigned long ustrtoul(const char *cp, char **endp, unsigned int base)
{
unsigned long result = simple_strtoul(cp, endp, base);
switch (**endp) {