From 16beb5aa5e8cb19892052f88bc4b6a521766726a Mon Sep 17 00:00:00 2001 From: Francisco Valente <1435136+franciscovalentecastro@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:31:08 +0000 Subject: [PATCH] in_dummy: rename time interval variables. Signed-off-by: Francisco Valente <1435136+franciscovalentecastro@users.noreply.github.com> --- plugins/in_dummy/in_dummy.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/in_dummy/in_dummy.c b/plugins/in_dummy/in_dummy.c index 333fb3326ef..193cec4165f 100644 --- a/plugins/in_dummy/in_dummy.c +++ b/plugins/in_dummy/in_dummy.c @@ -201,7 +201,8 @@ static int configure(struct flb_dummy *ctx, struct timespec *tm) { const char *msg; - double tmfrac; + double tm_interval_fractional; + int tm_interval_seconds; int root_type; int ret = -1; @@ -219,9 +220,10 @@ static int configure(struct flb_dummy *ctx, tm->tv_nsec = 0; if (ctx->rate > 1) { - tmfrac = (double) ctx->time_interval / ctx->rate; - tm->tv_sec = tmfrac; - tm->tv_nsec = (tmfrac - (int) tmfrac) * 1000000000; + tm_interval_fractional = (double) ctx->time_interval / ctx->rate; + tm_interval_seconds = (int) tm_interval_fractional; + tm->tv_sec = tm_interval_seconds; + tm->tv_nsec = (tm_interval_fractional - tm_interval_seconds) * 1000000000; } /* dummy timestamp */