]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Quiet warnings
authorDave Hart <hart@ntp.org>
Wed, 5 Jan 2011 08:08:26 +0000 (08:08 +0000)
committerDave Hart <hart@ntp.org>
Wed, 5 Jan 2011 08:08:26 +0000 (08:08 +0000)
bk: 4d2426fa28qu1TLKEzI9CX5XHogzYA

libntp/ntp_calendar.c
libntp/ssl_init.c

index ab1a18a77e192ed070457da51563be1880d33e75..8e9b1f99b1bcf73fd89e19d4ceaf60f63c0e785e 100644 (file)
  * --------------------------------------------------------------------
  */
 
-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);
 }
 
 /*
index fc22593370944e23a9f59012c81524d91955c56e..d4e468a9ce8aab9d415ab80dd2c80cc023d818ba 100644 (file)
@@ -38,10 +38,10 @@ ssl_check_version(void)
        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();