]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test: fix coverity 1338157: unchecked return value
authorPauli <ppzgs1@gmail.com>
Thu, 18 Mar 2021 22:44:09 +0000 (08:44 +1000)
committerPauli <pauli@openssl.org>
Thu, 25 Mar 2021 22:46:01 +0000 (08:46 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14615)

test/gmdifftest.c

index b0fc5c637f653d19b465055c35b3b4f7f0c618de..b1720ccf48397520f547cb28f0a121fbf24adbe6 100644 (file)
@@ -32,8 +32,8 @@ static int check_time(long offset)
     OPENSSL_gmtime(&t2, &tm2);
     OPENSSL_gmtime(&t1, &tm1);
     o1 = tm1;
-    OPENSSL_gmtime_adj(&tm1, 0, offset);
-    if (!TEST_int_eq(tm1.tm_year, tm2.tm_year)
+    if (!TEST_true(OPENSSL_gmtime_adj(&tm1, 0, offset))
+        || !TEST_int_eq(tm1.tm_year, tm2.tm_year)
         || !TEST_int_eq(tm1.tm_mon, tm2.tm_mon)
         || !TEST_int_eq(tm1.tm_mday, tm2.tm_mday)
         || !TEST_int_eq(tm1.tm_hour, tm2.tm_hour)