From: tb Date: Sun, 18 Feb 2024 17:13:29 +0000 (+0000) Subject: Tweak previous X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9639cda135f3ee78c21c0ed316faf1dc8e169011;p=openbsd Tweak previous --- diff --git a/regress/lib/libcrypto/asn1/asn1time.c b/regress/lib/libcrypto/asn1/asn1time.c index f764df12d59..3fe9f8df3d6 100644 --- a/regress/lib/libcrypto/asn1/asn1time.c +++ b/regress/lib/libcrypto/asn1/asn1time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1time.c,v 1.23 2024/02/18 16:56:33 tb Exp $ */ +/* $OpenBSD: asn1time.c,v 1.24 2024/02/18 17:13:29 tb Exp $ */ /* * Copyright (c) 2015 Joel Sing * Copyright (c) 2024 Google Inc. @@ -649,17 +649,16 @@ asn1_time_overflow(void) "leave copy of max_time unmodified\n"); goto err; } - if (OPENSSL_gmtime_adj(&max_time, 0, 1)) { + if (OPENSSL_gmtime_adj(©, 0, 1)) { fprintf(stderr, "FAIL: OPENSSL_gmtime_adj by 1 sec didn't " "fail for maximum time\n"); goto err; } - if (memcmp(&zero, &max_time, sizeof(max_time)) != 0) { + if (memcmp(&zero, ©, sizeof(copy)) != 0) { fprintf(stderr, "FAIL: failing OPENSSL_gmtime_adj didn't " "zero out max_time\n"); goto err; } - max_time = copy; min_time.tm_year = 0 - 1900; min_time.tm_mon = 1 - 1; @@ -679,18 +678,18 @@ asn1_time_overflow(void) "leave copy of min_time unmodified\n"); goto err; } - if (OPENSSL_gmtime_adj(&min_time, 0, -1)) { + if (OPENSSL_gmtime_adj(©, 0, -1)) { fprintf(stderr, "FAIL: OPENSSL_gmtime_adj by 1 sec didn't " "fail for minimum time\n"); goto err; } - if (memcmp(&zero, &min_time, sizeof(min_time)) != 0) { + if (memcmp(&zero, ©, sizeof(copy)) != 0) { fprintf(stderr, "FAIL: failing OPENSSL_gmtime_adj didn't " "zero out max_time\n"); goto err; } - min_time = copy; + copy = min_time; /* Test that we can offset by the valid minimum and maximum times. */ if (!OPENSSL_gmtime_adj(©, 0, valid_time_range)) { fprintf(stderr, "FAIL: OPENSSL_gmtime_adj by maximum range "