summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeck <>2020-09-14 09:09:08 +0000
committerbeck <>2020-09-14 09:09:08 +0000
commit464fe57002ebd46844bb91b15d841a01c6d8a81e (patch)
tree8bbb3fa26c6c506557e3204b068e9bfdc7609f25
parentf973df9eca8291b02684316970dbbb2bea7fa5c8 (diff)
downloadopenbsd-464fe57002ebd46844bb91b15d841a01c6d8a81e.tar.gz
openbsd-464fe57002ebd46844bb91b15d841a01c6d8a81e.tar.bz2
openbsd-464fe57002ebd46844bb91b15d841a01c6d8a81e.zip
remove unneded variable "time1"
noticed by llvm static analyzer ok tb@
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c
index a66ef76e6b..8a616b6bc2 100644
--- a/src/lib/libcrypto/x509/x509_vfy.c
+++ b/src/lib/libcrypto/x509/x509_vfy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.c,v 1.77 2020/09/14 08:06:09 beck Exp $ */ 1/* $OpenBSD: x509_vfy.c,v 1.78 2020/09/14 09:09:08 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -2001,15 +2001,15 @@ X509_cmp_current_time(const ASN1_TIME *ctm)
2001static int 2001static int
2002X509_cmp_time_internal(const ASN1_TIME *ctm, time_t *cmp_time, int clamp_notafter) 2002X509_cmp_time_internal(const ASN1_TIME *ctm, time_t *cmp_time, int clamp_notafter)
2003{ 2003{
2004 time_t time1, time2; 2004 time_t compare;
2005 struct tm tm1, tm2; 2005 struct tm tm1, tm2;
2006 int ret = 0; 2006 int ret = 0;
2007 int type; 2007 int type;
2008 2008
2009 if (cmp_time == NULL) 2009 if (cmp_time == NULL)
2010 time2 = time(NULL); 2010 compare = time(NULL);
2011 else 2011 else
2012 time2 = *cmp_time; 2012 compare = *cmp_time;
2013 2013
2014 memset(&tm1, 0, sizeof(tm1)); 2014 memset(&tm1, 0, sizeof(tm1));
2015 2015
@@ -2034,10 +2034,10 @@ X509_cmp_time_internal(const ASN1_TIME *ctm, time_t *cmp_time, int clamp_notafte
2034 * a time_t. A time_t must be sane if you care about times after 2034 * a time_t. A time_t must be sane if you care about times after
2035 * Jan 19 2038. 2035 * Jan 19 2038.
2036 */ 2036 */
2037 if ((time1 = timegm(&tm1)) == -1) 2037 if (timegm(&tm1) == -1)
2038 goto out; 2038 goto out;
2039 2039
2040 if (gmtime_r(&time2, &tm2) == NULL) 2040 if (gmtime_r(&compare, &tm2) == NULL)
2041 goto out; 2041 goto out;
2042 2042
2043 ret = ASN1_time_tm_cmp(&tm1, &tm2); 2043 ret = ASN1_time_tm_cmp(&tm1, &tm2);