summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2025-06-02 12:40:10 +0000
committertb <>2025-06-02 12:40:10 +0000
commita0e8b5e2ce5f6c14ed133fc2350b4268645c65d5 (patch)
tree8555c57ec7c63c930f166b2b28c14f9427741460 /src
parent0a9ae15841c7f994ec48b5317b89dbfe586ddcc7 (diff)
downloadopenbsd-a0e8b5e2ce5f6c14ed133fc2350b4268645c65d5.tar.gz
openbsd-a0e8b5e2ce5f6c14ed133fc2350b4268645c65d5.tar.bz2
openbsd-a0e8b5e2ce5f6c14ed133fc2350b4268645c65d5.zip
bn_gcd: fix wacky indentation found by smatch
via/ok jsg
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_gcd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_gcd.c b/src/lib/libcrypto/bn/bn_gcd.c
index aaf1dbe4a9..319d9ca390 100644
--- a/src/lib/libcrypto/bn/bn_gcd.c
+++ b/src/lib/libcrypto/bn/bn_gcd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_gcd.c,v 1.30 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: bn_gcd.c,v 1.31 2025/06/02 12:40:10 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 *
@@ -680,8 +680,10 @@ BN_mod_inverse_internal(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ct
680 /* A >= 2*B, so D=2 or D=3 */ 680 /* A >= 2*B, so D=2 or D=3 */
681 if (!BN_sub(M, A, T)) 681 if (!BN_sub(M, A, T))
682 goto err; 682 goto err;
683 if (!BN_add(D,T,B)) goto err; /* use D (:= 3*B) as temp */ 683 /* use D (:= 3*B) as temp */
684 if (BN_ucmp(A, D) < 0) { 684 if (!BN_add(D, T, B))
685 goto err;
686 if (BN_ucmp(A, D) < 0) {
685 /* A < 3*B, so D=2 */ 687 /* A < 3*B, so D=2 */
686 if (!BN_set_word(D, 2)) 688 if (!BN_set_word(D, 2))
687 goto err; 689 goto err;