new old patch - time.c

Ulrich Windl (Ulrich.Windl@rz.uni-regensburg.de)
Tue, 20 Feb 1996 12:21:34 +0100


Two comments on this one: 1) I'm not sure whether I'm right
2) This patch is against 1.2.13, and I haven't checked the
current code.

This is against the 1.2.13 sources. Unfortunately I don't have the
sources online; thus I can't patch, merge, and re-diff.
I'm not sure about this; please re-check!
===================================================================
RCS file: kernel/RCS/time.c,v
retrieving revision 1213.0
retrieving revision 1213.1
diff -u -r1213.0 -r1213.1
--- 1213.0 1995/08/17 17:46:05
+++ 1213.1 1995/08/31 18:01:13
@@ -481,7 +481,11 @@
*/
real_seconds = nowtime % 60;
real_minutes = nowtime / 60;
- if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
+ /* FIXME: the following is not correct: e.g. real_minutes = 2,
+ * cmos_minutes = 59. Additionally, can't the correction be -30?
+ * Finally, why not dealing with hour overflow?
+ */
+ if (abs(real_minutes - cmos_minutes) >= 15)
real_minutes += 30; /* correct for half hour time zone */
real_minutes %= 60;