summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeck <>2020-09-14 09:43:33 +0000
committerbeck <>2020-09-14 09:43:33 +0000
commit37c92b573ed30b6261d61768c7e84e8ad461c2bc (patch)
treef8e0ab95357bd5749550a3f6946a6997818f128b
parent9020aa1d4f261da8b550cb5ff74847e43bdb527b (diff)
downloadopenbsd-37c92b573ed30b6261d61768c7e84e8ad461c2bc.tar.gz
openbsd-37c92b573ed30b6261d61768c7e84e8ad461c2bc.tar.bz2
openbsd-37c92b573ed30b6261d61768c7e84e8ad461c2bc.zip
remove unneeded variable "type".
Yak for my shaving pleasure found by llvm static analyzer ok tb@
-rw-r--r--src/lib/libcrypto/x509/x509_constraints.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/x509/x509_constraints.c b/src/lib/libcrypto/x509/x509_constraints.c
index 1b351c958e..d89ffd650d 100644
--- a/src/lib/libcrypto/x509/x509_constraints.c
+++ b/src/lib/libcrypto/x509/x509_constraints.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_constraints.c,v 1.2 2020/09/14 09:29:23 beck Exp $ */ 1/* $OpenBSD: x509_constraints.c,v 1.3 2020/09/14 09:43:33 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -947,7 +947,6 @@ x509_constraints_extract_constraints(X509 *cert,
947 struct x509_constraints_name *vname; 947 struct x509_constraints_name *vname;
948 NAME_CONSTRAINTS *nc = cert->nc; 948 NAME_CONSTRAINTS *nc = cert->nc;
949 GENERAL_SUBTREE *subtree; 949 GENERAL_SUBTREE *subtree;
950 int type;
951 int i; 950 int i;
952 951
953 if (nc == NULL) 952 if (nc == NULL)
@@ -964,8 +963,8 @@ x509_constraints_extract_constraints(X509 *cert,
964 *error = X509_V_ERR_OUT_OF_MEM; 963 *error = X509_V_ERR_OUT_OF_MEM;
965 return 0; 964 return 0;
966 } 965 }
967 if ((type = x509_constraints_validate(subtree->base, 966 if (x509_constraints_validate(subtree->base, vname, error) ==
968 vname, error)) == 0) { 967 0) {
969 x509_constraints_name_free(vname); 968 x509_constraints_name_free(vname);
970 return 0; 969 return 0;
971 } 970 }
@@ -990,8 +989,8 @@ x509_constraints_extract_constraints(X509 *cert,
990 *error = X509_V_ERR_OUT_OF_MEM; 989 *error = X509_V_ERR_OUT_OF_MEM;
991 return 0; 990 return 0;
992 } 991 }
993 if ((type = x509_constraints_validate(subtree->base, 992 if (x509_constraints_validate(subtree->base, vname, error) ==
994 vname, error)) == 0) { 993 0) {
995 x509_constraints_name_free(vname); 994 x509_constraints_name_free(vname);
996 return 0; 995 return 0;
997 } 996 }