Fix a division which I had made a multiplication.

Fix return value from ntp_adjtime().

Submitted by:	jhay
This commit is contained in:
Poul-Henning Kamp 1999-04-04 19:56:04 +00:00
parent 07872b08c4
commit a508801763
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45302

View File

@ -287,7 +287,7 @@ ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap)
return (error);
s = splclock();
if (modes & MOD_FREQUENCY) {
freq = (ntv.freq * 1000LL) << 16;
freq = (ntv.freq * 1000LL) >> 16;
if (freq > MAXFREQ)
L_LINT(time_freq, MAXFREQ);
else if (freq < -MAXFREQ)
@ -378,8 +378,10 @@ ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap)
time_status & STA_PPSJITTER) ||
(time_status & STA_PPSFREQ &&
time_status & (STA_PPSWANDER | STA_PPSERROR)))
return (TIME_ERROR);
return (time_state);
p->p_retval[0] = TIME_ERROR;
else
p->p_retval[0] = time_state;
return (error);
}
/*