X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime.c;h=8991703fd0662fad4616ed8ab66f154f12c0ade9;hp=1a0f827460c9da6562678733f041be73c2eec484;hb=c2acfbac7e9eb8ac5407ac024c0fd000614c77e2;hpb=4e0a8fa2593006505b7f4e18931a201d221b49e9 diff --git a/gettime.c b/gettime.c index 1a0f8274..8991703f 100644 --- a/gettime.c +++ b/gettime.c @@ -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; } @@ -327,7 +327,7 @@ void fio_local_clock_init(int is_thread) { struct tv_valid *t; - t = calloc(sizeof(*t), 1); + t = calloc(1, sizeof(*t)); if (pthread_setspecific(tv_tls_key, t)) log_err("fio: can't set TLS key\n"); }