From: tb Date: Thu, 11 Aug 2022 10:36:32 +0000 (+0000) Subject: Remove unused variable X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1b101d0e13ac9049eb40f2551caad955c7888e06;p=openbsd 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 --- diff --git a/lib/libcrypto/asn1/t_x509.c b/lib/libcrypto/asn1/t_x509.c index b2fd80b559b..5f520f5cb89 100644 --- a/lib/libcrypto/asn1/t_x509.c +++ b/lib/libcrypto/asn1/t_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_x509.c,v 1.39 2022/08/10 16:51:26 tb Exp $ */ +/* $OpenBSD: t_x509.c,v 1.40 2022/08/11 10:36:32 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -470,9 +470,8 @@ int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase) { char *s, *c, *b; - int ret = 0, l, i; - - l = 80 - 2 - obase; + int i; + int ret = 0; b = X509_NAME_oneline(name, NULL, 0); if (b == NULL) @@ -497,12 +496,10 @@ X509_NAME_print(BIO *bp, const X509_NAME *name, int obase) if (BIO_write(bp, ", ", 2) != 2) goto err; } - l--; } if (*s == '\0') break; s++; - l--; } ret = 1;