From be916e04ea1975640b46036c9e557ca19e5e9941 Mon Sep 17 00:00:00 2001 From: Jennifer Williams Date: Wed, 10 Mar 2021 04:00:04 +0200 Subject: [PATCH] include: sys: time_units: fix missing final else z_tmcvt() was missing final else statement in the if else if construct. This commit removes the else if in this small structure to comply with guideline 15.7. Signed-off-by: Jennifer Williams --- include/sys/time_units.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sys/time_units.h b/include/sys/time_units.h index 0ed0f8438ee..3b18aba69d6 100644 --- a/include/sys/time_units.h +++ b/include/sys/time_units.h @@ -96,7 +96,8 @@ static TIME_CONSTEXPR ALWAYS_INLINE uint64_t z_tmcvt(uint64_t t, uint32_t from_h if (round_up) { off = rdivisor - 1U; - } else if (round_off) { + } + if (round_off) { off = rdivisor / 2U; } }