clock: buff our coverage numbers slightly.
clock_gettime() with known arguments can't fail (and we ignore its
return value in most other places already).
Test: treehugger
Change-Id: I2374ae5ba1598a01d4c4f689b9c75c4e7dc926b6
diff --git a/libc/bionic/clock.cpp b/libc/bionic/clock.cpp
index fda0708..31e6c3c 100644
--- a/libc/bionic/clock.cpp
+++ b/libc/bionic/clock.cpp
@@ -35,8 +35,6 @@
// http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock.html
clock_t clock() {
timespec ts;
- if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == -1) {
- return -1;
- }
+ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts);
return (ts.tv_sec * CLOCKS_PER_SEC) + (ts.tv_nsec / (NS_PER_S / CLOCKS_PER_SEC));
}