tw.tw_clock = *clock;
- return (&tw);
+ return &tw;
}
tw.tw_clock = *clock;
- return (&tw);
+ return &tw;
}
while (--mon)
result += dmsize[mon - 1];
result += mday - 1;
- result = 24 * result + hour;
- result = 60 * result + min;
- result = 60 * result + sec;
+ result *= 24; /* Days to hours. */
+ result += hour;
+ result *= 60; /* Hours to minutes. */
+ result += min;
+ result *= 60; /* Minutes to seconds. */
+ result += sec;
result -= 60 * tw->tw_zone;
if (tw->tw_flags & TW_DST)
- result -= 60 * 60;
+ result -= 60 * 60; /* One hour. */
return (tw->tw_clock = result);
}
if (tw2->tw_clock == 0)
dmktime (tw2);
- return ((c1 = tw1->tw_clock) > (c2 = tw2->tw_clock) ? 1
- : c1 == c2 ? 0 : -1);
+ return (c1 = tw1->tw_clock) > (c2 = tw2->tw_clock) ? 1
+ : c1 == c2 ? 0 : -1;
}