mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
libc: atoi() is supposed to return 0 if handed a NULL pointer
Change-Id: I2d77532536ca83e5c9c2d7622a0e672082969f75
This commit is contained in:
parent
2e9443104f
commit
7318d393ea
1 changed files with 4 additions and 1 deletions
|
@ -26,7 +26,10 @@ int atoi (const char *str)
|
|||
{
|
||||
int value = 0;
|
||||
int sign = 1;
|
||||
|
||||
|
||||
if (!str)
|
||||
return 0;
|
||||
|
||||
while (isspace(*str))
|
||||
{
|
||||
str++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue