Loading...
gen/clock_gettime.c Libc-1725.40.4 Libc-1669.40.2
--- Libc/Libc-1725.40.4/gen/clock_gettime.c
+++ Libc/Libc-1669.40.2/gen/clock_gettime.c
@@ -104,11 +104,7 @@
 
     // Mach Absolute Time unit-based calls
     mach_timebase_info_data_t tb_info;
-    kern_return_t kr = mach_timebase_info(&tb_info);
-    if (kr != KERN_SUCCESS) {
-        errno = EINVAL;
-        return 0;
-    }
+    if (mach_timebase_info(&tb_info)) return 0;
     uint64_t mach_time;
 
     switch(clock_id){
@@ -199,9 +195,7 @@
     case CLOCK_UPTIME_RAW_APPROX:
     case CLOCK_THREAD_CPUTIME_ID: {
         mach_timebase_info_data_t tb_info;
-        kern_return_t kr = mach_timebase_info(&tb_info);
-        if (kr != KERN_SUCCESS) {
-            errno = EINVAL;
+        if (mach_timebase_info(&tb_info)){
             return -1;
         }
         res->tv_nsec = tb_info.numer / tb_info.denom + (tb_info.numer % tb_info.denom != 0);