Fix strerror(3) for errno 0.

Everyone else's C library says "Success". We say "Unknown error: 0", which
isn't really true.

Change-Id: I9f9054779123eda996634e5f7a277789b6805809
This commit is contained in:
Elliott Hughes 2011-05-13 10:53:53 -07:00
parent 2848ca2c05
commit bf018299bd
2 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@
#ifndef __BIONIC_ERRDEF
#error "__BIONIC_ERRDEF must be defined before including this file"
#endif
__BIONIC_ERRDEF( 0 , 0, "Success" )
__BIONIC_ERRDEF( EPERM , 1, "Operation not permitted" )
__BIONIC_ERRDEF( ENOENT , 2, "No such file or directory" )
__BIONIC_ERRDEF( ESRCH , 3, "No such process" )

View File

@ -21,7 +21,7 @@ __code_string_lookup( const CodeString* strings,
for (;;)
{
if (strings[nn].code == 0)
if (strings[nn].msg == NULL)
break;
if (strings[nn].code == code)