Messages in this thread Patch in this message |  | | Subject | Re: [RFC][PATCH - 4/13] NTP cleanup: Breakup ntp_adjtimex() | From | john stultz <> | Date | Mon, 15 Aug 2005 19:08:00 -0700 |
| |
On Wed, 2005-08-10 at 18:27 -0700, john stultz wrote: > All, > This patch breaks up the complex nesting of code in ntp_adjtimex() by > creating a ntp_hardupdate() function and simplifying some of the logic. > This also mimics the documented NTP spec somewhat better. > > Any comments or feedback would be greatly appreciated.
Ugh. I just caught a bug where I misplaced the parens.
> - } /* STA_PLL */ > + else if (ntp_hardupdate(txc->offset, xtime)) > + result = TIME_ERROR; > + } > } /* txc->modes & ADJ_OFFSET */
That's wrong. The following patch fixes it.
thanks -john
diff --git a/kernel/ntp.c b/kernel/ntp.c --- a/kernel/ntp.c +++ b/kernel/ntp.c @@ -388,9 +388,8 @@ int ntp_adjtimex(struct timex *txc) /* adjtime() is independent from ntp_adjtime() */ if ((time_next_adjust = txc->offset) == 0) time_adjust = 0; - else if (ntp_hardupdate(txc->offset, xtime)) - result = TIME_ERROR; - } + } else if (ntp_hardupdate(txc->offset, xtime)) + result = TIME_ERROR; } /* txc->modes & ADJ_OFFSET */ if (txc->modes & ADJ_TICK) {
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |