summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1dd139e)
That's why a negative int is flipped over into unsigned by assuming
two's complement.
unsigned os, hours, mins;
pos = offset >= 0;
unsigned os, hours, mins;
pos = offset >= 0;
- os = pos ? offset : ~offset + 1;
+ os = pos ? offset : ~offset + 1; /* abs(3) undefined on INT_MIN. */
hours = os / 60;
mins = os % 60;
hours = os / 60;
mins = os % 60;