bk: 4d2426fa28qu1TLKEzI9CX5XHogzYA
* --------------------------------------------------------------------
*/
-static systime_func_ptr systime_func = time;
+static systime_func_ptr systime_func = &time;
+static inline time_t now(void);
+
systime_func_ptr
ntpcal_set_timefunc(
- systime_func_ptr nfunc)
+ systime_func_ptr nfunc
+ )
{
- systime_func_ptr res = systime_func;
-
- if (!nfunc)
- nfunc = time;
- systime_func = nfunc;
-
- return res;
-}
+ systime_func_ptr res;
+
+ res = systime_func;
+ if (NULL == nfunc)
+ nfunc = &time;
+ systime_func = nfunc;
+ return res;
+}
-static time_t
-now()
+static inline time_t
+now(void)
{
- if (systime_func)
return (*systime_func)(NULL);
- else
- return time(NULL);
}
/*
if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L) {
msyslog(LOG_WARNING,
"OpenSSL version mismatch. Built against %lx, you have %lx\n",
- OPENSSL_VERSION_NUMBER, SSLeay());
+ (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
fprintf(stderr,
"OpenSSL version mismatch. Built against %lx, you have %lx\n",
- OPENSSL_VERSION_NUMBER, SSLeay());
+ (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
}
INIT_SSL();