Minor clock_getcpuclockid optimization.
Don't ask the kernel to copy data to userspace if we don't need it.
(Noticed while cleaning up sysconf to not call clock_getres.)
Change-Id: Icc0f7559775b8a2dcefe638ce831d06b75d67122
diff --git a/libc/bionic/clock_getcpuclockid.cpp b/libc/bionic/clock_getcpuclockid.cpp
index 5511eb4..9ff1845 100644
--- a/libc/bionic/clock_getcpuclockid.cpp
+++ b/libc/bionic/clock_getcpuclockid.cpp
@@ -40,8 +40,7 @@
result |= 2;
// Bit 2: thread (set) or process (clear). Bit 2 already 0.
- timespec ts;
- if (clock_getres(result, &ts) == -1) {
+ if (clock_getres(result, nullptr) == -1) {
return ESRCH;
}