Fix JSON_INTEGER overflow on Windows by changing datatype to 'long long'
[fio.git] / gettime.c
index 277f2cf87ec16229150651ee85a163ed0b5ce7f4..b89cd46fdd14e7cbe6290a424416b6268a6543d8 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -32,7 +32,7 @@ static pthread_key_t tv_tls_key;
 
 enum fio_cs fio_clock_source = FIO_PREFERRED_CLOCK_SOURCE;
 int fio_clock_source_set = 0;
-enum fio_cs fio_clock_source_inited = CS_INVAL;
+static enum fio_cs fio_clock_source_inited = CS_INVAL;
 
 #ifdef FIO_DEBUG_TIME
 
@@ -205,7 +205,7 @@ void fio_gettime(struct timeval *tp, void fio_unused *caller)
 
        gtod_log_caller(caller);
 #endif
-       if (fio_tv) {
+       if (fio_unlikely(fio_tv)) {
                memcpy(tp, fio_tv, sizeof(*tp));
                return;
        }