From 0a9ae15841c7f994ec48b5317b89dbfe586ddcc7 Mon Sep 17 00:00:00 2001 From: jsg <> Date: Mon, 2 Jun 2025 12:18:22 +0000 Subject: correct indentation, no functional change found with smatch, ok tb@ --- src/lib/libcrypto/asn1/asn_mime.c | 7 ++++--- src/lib/libcrypto/bio/bss_acpt.c | 11 ++++++----- src/lib/libcrypto/bio/bss_conn.c | 4 ++-- src/lib/libcrypto/err/err.c | 4 ++-- src/lib/libcrypto/x509/x509_conf.c | 7 ++++--- src/lib/libcrypto/x509/x509_prn.c | 7 ++++--- src/lib/libssl/bio_ssl.c | 6 ++---- src/lib/libssl/ssl_lib.c | 7 ++++--- 8 files changed, 28 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/asn1/asn_mime.c b/src/lib/libcrypto/asn1/asn_mime.c index 932bfcf0b4..d42dd8663e 100644 --- a/src/lib/libcrypto/asn1/asn_mime.c +++ b/src/lib/libcrypto/asn1/asn_mime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn_mime.c,v 1.36 2025/05/10 05:54:38 tb Exp $ */ +/* $OpenBSD: asn_mime.c,v 1.37 2025/06/02 12:18:21 jsg Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -507,8 +507,9 @@ SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it) *bcont = sk_BIO_value(parts, 0); BIO_free(asnin); sk_BIO_free(parts); - } else sk_BIO_pop_free(parts, BIO_vfree); - return val; + } else + sk_BIO_pop_free(parts, BIO_vfree); + return val; } /* OK, if not multipart/signed try opaque signature */ diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c index 73d147f4c1..60e61100b1 100644 --- a/src/lib/libcrypto/bio/bss_acpt.c +++ b/src/lib/libcrypto/bio/bss_acpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_acpt.c,v 1.32 2025/05/10 05:54:38 tb Exp $ */ +/* $OpenBSD: bss_acpt.c,v 1.33 2025/06/02 12:18:21 jsg Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -261,11 +261,12 @@ again: if (c->bio_chain != NULL) { if ((dbio = BIO_dup_chain(c->bio_chain)) == NULL) goto err; - if (!BIO_push(dbio, bio)) goto err; - bio = dbio; + if (!BIO_push(dbio, bio)) + goto err; + bio = dbio; } - if (BIO_push(b, bio) - == NULL) goto err; + if (BIO_push(b, bio) == NULL) + goto err; c->state = ACPT_S_OK; return (1); diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c index 24dad82f5f..14f410f59d 100644 --- a/src/lib/libcrypto/bio/bss_conn.c +++ b/src/lib/libcrypto/bio/bss_conn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_conn.c,v 1.42 2025/05/10 05:54:38 tb Exp $ */ +/* $OpenBSD: bss_conn.c,v 1.43 2025/06/02 12:18:21 jsg Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -141,7 +141,7 @@ conn_state(BIO *b, BIO_CONNECT *c) } for (; *p != '\0'; p++) { if ((*p == ':') || (*p == '/')) - break; + break; } i= *p; diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index f03a4431e7..d8c0472857 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err.c,v 1.76 2025/05/20 09:25:40 tb Exp $ */ +/* $OpenBSD: err.c,v 1.77 2025/06/02 12:18:21 jsg Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -824,7 +824,7 @@ err_clear_last_constant_time(int clear) es = ERR_get_state(); if (es == NULL) - return; + return; top = es->top; diff --git a/src/lib/libcrypto/x509/x509_conf.c b/src/lib/libcrypto/x509/x509_conf.c index 19f771c466..2089f72bc7 100644 --- a/src/lib/libcrypto/x509/x509_conf.c +++ b/src/lib/libcrypto/x509/x509_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_conf.c,v 1.30 2025/05/10 05:54:39 tb Exp $ */ +/* $OpenBSD: x509_conf.c,v 1.31 2025/06/02 12:18:21 jsg Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -242,8 +242,9 @@ v3_check_critical(const char **value) if ((strlen(p) < 9) || strncmp(p, "critical,", 9)) return 0; p += 9; - while (isspace((unsigned char)*p)) p++; - *value = p; + while (isspace((unsigned char)*p)) + p++; + *value = p; return 1; } diff --git a/src/lib/libcrypto/x509/x509_prn.c b/src/lib/libcrypto/x509/x509_prn.c index 3bf7c803e5..23c649a7b9 100644 --- a/src/lib/libcrypto/x509/x509_prn.c +++ b/src/lib/libcrypto/x509/x509_prn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_prn.c,v 1.6 2023/05/08 05:30:38 tb Exp $ */ +/* $OpenBSD: x509_prn.c,v 1.7 2025/06/02 12:18:22 jsg Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -87,8 +87,9 @@ X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) for (i = 0; i < sk_CONF_VALUE_num(val); i++) { if (ml) BIO_printf(out, "%*s", indent, ""); - else if (i > 0) BIO_printf(out, ", "); - nval = sk_CONF_VALUE_value(val, i); + else if (i > 0) + BIO_printf(out, ", "); + nval = sk_CONF_VALUE_value(val, i); if (!nval->name) BIO_puts(out, nval->value); else if (!nval->value) diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c index 6dd1699606..13e4f30539 100644 --- a/src/lib/libssl/bio_ssl.c +++ b/src/lib/libssl/bio_ssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_ssl.c,v 1.40 2023/07/19 13:34:33 tb Exp $ */ +/* $OpenBSD: bio_ssl.c,v 1.41 2025/06/02 12:18:22 jsg Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -229,9 +229,7 @@ ssl_write(BIO *b, const char *out, int outl) BIO_clear_retry_flags(b); -/* ret=SSL_do_handshake(ssl); - if (ret > 0) */ - ret = SSL_write(ssl, out, outl); + ret = SSL_write(ssl, out, outl); switch (SSL_get_error(ssl, ret)) { case SSL_ERROR_NONE: diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index ce68981493..be6ad1bf9a 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.331 2025/03/12 14:03:55 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.332 2025/06/02 12:18:22 jsg Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -3008,8 +3008,9 @@ SSL_dup(SSL *s) /* Dup the client_CA list */ if (s->client_CA != NULL) { - if ((sk = sk_X509_NAME_dup(s->client_CA)) == NULL) goto err; - ret->client_CA = sk; + if ((sk = sk_X509_NAME_dup(s->client_CA)) == NULL) + goto err; + ret->client_CA = sk; for (i = 0; i < sk_X509_NAME_num(sk); i++) { xn = sk_X509_NAME_value(sk, i); if (sk_X509_NAME_set(sk, i, -- cgit v1.2.3-55-g6feb