Re: [PATCH 1/3] xenbaked: properly use time_t in dump_stats()

2022-08-18 Thread Jan Beulich
On 18.08.2022 18:34, Anthony PERARD wrote: > On Thu, Aug 18, 2022 at 04:05:37PM +0200, Jan Beulich wrote: >> @@ -242,13 +238,11 @@ static void dump_stats(void) >> smt++; >> } >> >> -printf("processed %d total records in %d seconds (%ld per second)\n", >> - rec_count, (

Re: [PATCH 1/3] xenbaked: properly use time_t in dump_stats()

2022-08-18 Thread Anthony PERARD
On Thu, Aug 18, 2022 at 04:05:37PM +0200, Jan Beulich wrote: > "int" is not a suitable type to convert time()'s return value to. Avoid > casts and other extra fiddling by using difftime(), on the assumption > that the overhead of using "double" doesn't matter here. dump_stats() seems to be only us

[PATCH 1/3] xenbaked: properly use time_t in dump_stats()

2022-08-18 Thread Jan Beulich
"int" is not a suitable type to convert time()'s return value to. Avoid casts and other extra fiddling by using difftime(), on the assumption that the overhead of using "double" doesn't matter here. Coverity ID: 1509374 Signed-off-by: Jan Beulich --- unstable.orig/tools/xenmon/xenbaked.c 2