mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
c554b57859
commit
d68fd2922c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue