From d68fd2922c8978dcd929e7ece16732a8b83aa884 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 31 Jul 2022 21:55:33 +0200 Subject: [PATCH] trivial: remove obscure division-assignment operator In utc_mkdate() we find the interesting statement val = timestamp /= 60; which not only calculates timestamp / 60, but also overwrites timestamp with the new value. However, timestamp is never used in the remainder of the function, because the whole point is to switch to 32-bit types. Thus, replace the division-assignment by a simple division operator to avoid head-scratching. Signed-off-by: Berthold Stoeger --- core/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/time.c b/core/time.c index 0dd47856b..5ee177fab 100644 --- a/core/time.c +++ b/core/time.c @@ -56,7 +56,7 @@ void utc_mkdate(timestamp_t timestamp, struct tm *tm) /* minutes since 1900 */ tm->tm_sec = timestamp % 60; - val = timestamp /= 60; + val = timestamp / 60; /* Do the simple stuff */ tm->tm_min = val % 60;