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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-07-31 21:55:33 +02:00 committed by Dirk Hohndel
parent c554b57859
commit d68fd2922c

View file

@ -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;