X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime-thread.c;h=c1b4b0967c28f354b8a3e6c9ad82fc2845c41e56;hp=da409042f2ec6eb7344b6f943dad0eba84c54cd1;hb=10a6b3c67042914fe9d287027bf8792f69e84524;hpb=39ab7da23768081db50b0026e0c2a8e38752e7a4 diff --git a/gettime-thread.c b/gettime-thread.c index da409042..c1b4b096 100644 --- a/gettime-thread.c +++ b/gettime-thread.c @@ -14,12 +14,14 @@ static pthread_t gtod_thread; void fio_gtod_init(void) { fio_tv = smalloc(sizeof(struct timeval)); - assert(fio_tv); + if (!fio_tv) + log_err("fio: smalloc pool exhausted\n"); } static void fio_gtod_update(void) { - gettimeofday(fio_tv, NULL); + if (fio_tv) + gettimeofday(fio_tv, NULL); } static void *gtod_thread_main(void *data)