commit | bf018299bd556867ffcd573417c11f6c83f601cd | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri May 13 10:53:53 2011 -0700 |
committer | Elliott Hughes <enh@google.com> | Fri May 13 10:54:34 2011 -0700 |
tree | 374ace0548e37bdca78014a706472cd7d026211e | |
parent | 2848ca2c05fc30d1ff3405c9467605dce82c5d90 [diff] [blame] |
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
diff --git a/libc/string/strerror_r.c b/libc/string/strerror_r.c index f43d417..2f26f17 100644 --- a/libc/string/strerror_r.c +++ b/libc/string/strerror_r.c
@@ -21,7 +21,7 @@ for (;;) { - if (strings[nn].code == 0) + if (strings[nn].msg == NULL) break; if (strings[nn].code == code)