Various coverage improvements.
Mostly from extra test cases, but also:
* Move the fgets size < 0 assertion into fgets.
* Use ELF aliases for strtoq/strtouq rather than duplicating code.
* Don't check uname() succeeded, since it can't fail.
Test: treehugger
Change-Id: I2e6b3b88b0a3eb16bd68be68b9bc9f40d8043291
diff --git a/libc/bionic/strtol.cpp b/libc/bionic/strtol.cpp
index 63ac102..77f1d92 100644
--- a/libc/bionic/strtol.cpp
+++ b/libc/bionic/strtol.cpp
@@ -184,9 +184,7 @@
}
// Public API since L, but not in any header.
-extern "C" long long strtoq(const char* s, char** end, int base) {
- return strtoll(s, end, base);
-}
+__strong_alias(strtoq, strtoll);
unsigned long strtoul(const char* s, char** end, int base) {
return StrToU<unsigned long, ULONG_MAX>(s, end, base);
@@ -201,6 +199,4 @@
}
// Public API since L, but not in any header.
-extern "C" unsigned long long strtouq(const char* s, char** end, int base) {
- return strtoull(s, end, base);
-}
+__strong_alias(strtouq, strtoull);