summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2022-08-11 10:36:32 +0000
committertb <>2022-08-11 10:36:32 +0000
commite63a30527a3acc5f0e98cde565636feb2a8b7aea (patch)
treea6d6126e14d40bafd56105dde0467163e1fc4038 /src
parentf2180ecff31e646ade77376f9c1694e54f7f8d32 (diff)
downloadopenbsd-e63a30527a3acc5f0e98cde565636feb2a8b7aea.tar.gz
openbsd-e63a30527a3acc5f0e98cde565636feb2a8b7aea.tar.bz2
openbsd-e63a30527a3acc5f0e98cde565636feb2a8b7aea.zip
Remove unused variable
X509_NAME_print() is documented to print things at a given indentation level. Unfortunately, this never worked since someone got some logic wrong. Part of the wrong logic was removed in a dead code removal in OpenSSL commit 92ada7cc, but the variable l was left behind, which leads to compiler warnings on some platforms. End its sad life pointlessly and incorrectly measuring column width and remove it. ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/asn1/t_x509.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c
index b2fd80b559..5f520f5cb8 100644
--- a/src/lib/libcrypto/asn1/t_x509.c
+++ b/src/lib/libcrypto/asn1/t_x509.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_x509.c,v 1.39 2022/08/10 16:51:26 tb Exp $ */ 1/* $OpenBSD: t_x509.c,v 1.40 2022/08/11 10:36:32 tb 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 *
@@ -470,9 +470,8 @@ int
470X509_NAME_print(BIO *bp, const X509_NAME *name, int obase) 470X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
471{ 471{
472 char *s, *c, *b; 472 char *s, *c, *b;
473 int ret = 0, l, i; 473 int i;
474 474 int ret = 0;
475 l = 80 - 2 - obase;
476 475
477 b = X509_NAME_oneline(name, NULL, 0); 476 b = X509_NAME_oneline(name, NULL, 0);
478 if (b == NULL) 477 if (b == NULL)
@@ -497,12 +496,10 @@ X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
497 if (BIO_write(bp, ", ", 2) != 2) 496 if (BIO_write(bp, ", ", 2) != 2)
498 goto err; 497 goto err;
499 } 498 }
500 l--;
501 } 499 }
502 if (*s == '\0') 500 if (*s == '\0')
503 break; 501 break;
504 s++; 502 s++;
505 l--;
506 } 503 }
507 504
508 ret = 1; 505 ret = 1;