libc: atoi() is supposed to return 0 if handed a NULL pointer
Change-Id: I2d77532536ca83e5c9c2d7622a0e672082969f75
This commit is contained in:
parent
2e9443104f
commit
7318d393ea
|
@ -26,7 +26,10 @@ int atoi (const char *str)
|
|||
{
|
||||
int value = 0;
|
||||
int sign = 1;
|
||||
|
||||
|
||||
if (!str)
|
||||
return 0;
|
||||
|
||||
while (isspace(*str))
|
||||
{
|
||||
str++;
|
||||
|
|
Loading…
Reference in New Issue