[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Mon Feb 26 16:48:56 UTC 2018


The branch master has been updated
       via  b9d1ad32039a8203e79845eafc8acd199c20a807 (commit)
      from  b38ede8043439d99a3c6c174f17b91875cce66ac (commit)


- Log -----------------------------------------------------------------
commit b9d1ad32039a8203e79845eafc8acd199c20a807
Author: Andy Polyakov <appro at openssl.org>
Date:   Sun Feb 25 16:24:34 2018 +0100

    test/ct_test.c: remove dependency on -lm.
    
    fabs(3m) is customarily inlined, but it's not, one has to link with -lm.
    Since fabs(3m) is the only reference, it makes more sense to avoid it.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 test/ct_test.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/ct_test.c b/test/ct_test.c
index 6c848af..ce99f42 100644
--- a/test/ct_test.c
+++ b/test/ct_test.c
@@ -8,7 +8,6 @@
  */
 
 #include <ctype.h>
-#include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -297,7 +296,8 @@ static int execute_cert_test(CT_TEST_FIXTURE *fixture)
             for (i = 0; i < sk_SCT_num(scts); ++i) {
                 SCT *sct_i = sk_SCT_value(scts, i);
 
-                if (!TEST_int_eq(SCT_get_source(sct_i), SCT_SOURCE_X509V3_EXTENSION)) {
+                if (!TEST_int_eq(SCT_get_source(sct_i),
+                                 SCT_SOURCE_X509V3_EXTENSION)) {
                     goto end;
                 }
             }
@@ -504,8 +504,8 @@ static int test_default_ct_policy_eval_ctx_time_is_now(void)
                                 1000;
     const time_t time_tolerance = 600;  /* 10 minutes */
 
-    if (!TEST_uint_le((unsigned int)fabs(difftime(time(NULL), default_time)),
-                      (unsigned int)time_tolerance))
+    if (!TEST_time_t_le(abs((int)difftime(time(NULL), default_time)),
+                        time_tolerance))
         goto end;
 
     success = 1;


More information about the openssl-commits mailing list