int rc;
/* just do nothing if there is no leap file */
- if ( ! (fname && *fname))
+ if ( !(fname && *fname) )
return FALSE;
/* try to stat the leapfile */
/* silently skip to postcheck if no new file found */
if (NULL != sb_old) {
- if (!force &&
- sb_old->st_mtime == sb_new.st_mtime &&
- sb_old->st_ctime == sb_new.st_ctime )
+ if (!force
+ && sb_old->st_mtime == sb_new.st_mtime
+ && sb_old->st_ctime == sb_new.st_ctime
+ )
return FALSE;
*sb_old = sb_new;
}
pt = leapsec_get_table(TRUE);
now64 = ntpcal_ntp_to_ntp(ntpnow, pivot);
- return leapsec_add(pt, &now64, (insert != 0))
- && leapsec_set_table(pt);
+ return ( leapsec_add(pt, &now64, (insert != 0))
+ && leapsec_set_table(pt));
}
/* =====================================================================
* the extend the table beyond the expiration!
*/
if ( ucmpv64(now64, &pt->head.expire) < 0
- || (pt->head.size && ucmpv64(now64, &pt->info[0].ttime) <= 0)) {
+ || (pt->head.size && ucmpv64(now64, &pt->info[0].ttime) <= 0)) {
errno = ERANGE;
return FALSE;
}
uint32_t hi)
{
int rc;
+
if (lo <= hi)
rc = (lo <= x) && (x < hi);
else
logPrefix, leapfile_name, -rc);
else
msyslog(LOG_WARNING,
- "%s ('%s'): will expire in less than %d days",
- logPrefix, leapfile_name, 1+rc);
+ "%s ('%s'): will expire in less than %d day%s",
+ logPrefix, leapfile_name, 1+rc, (rc) ? "s" : "");
}
}