- if (u.u_error = suser(u.u_cred, &u.u_acflag))
- return;
- u.u_error = copyin((caddr_t)uap->delta, (caddr_t)&atv,
- sizeof (struct timeval));
- if (u.u_error)
- return;
+ if (error = suser(p->p_ucred, &p->p_acflag))
+ return (error);
+ if (error =
+ copyin((caddr_t)uap->delta, (caddr_t)&atv, sizeof(struct timeval)))
+ return (error);
+
+ /*
+ * Compute the total correction and the rate at which to apply it.
+ * Round the adjustment down to a whole multiple of the per-tick
+ * delta, so that after some number of incremental changes in
+ * hardclock(), tickdelta will become zero, lest the correction
+ * overshoot and start taking us away from the desired final time.
+ */