X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime.c;h=7e3e2e5b4375724dcb826c2c34523b994b0d3034;hp=30513e03162187c3154b9b9097a201b731bbdde9;hb=d5e16441bd7727f3e1b90708f957d42a7e47121d;hpb=b3fa625b38a638cd1783e9fdcac1b958e37e48fa diff --git a/gettime.c b/gettime.c index 30513e03..7e3e2e5b 100644 --- a/gettime.c +++ b/gettime.c @@ -65,7 +65,7 @@ static struct gtod_log *find_hash(void *caller) return NULL; } -static struct gtod_log *find_log(void *caller) +static void inc_caller(void *caller) { struct gtod_log *log = find_hash(caller); @@ -81,16 +81,13 @@ static struct gtod_log *find_log(void *caller) flist_add_tail(&log->list, &hash[h]); } - return log; + log->calls++; } static void gtod_log_caller(void *caller) { - if (gtod_inited) { - struct gtod_log *log = find_log(caller); - - log->calls++; - } + if (gtod_inited) + inc_caller(caller); } static void fio_exit fio_dump_gtod(void)