From d4b525fbf26035d19f439c692fdca8c61144d5d6 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 1 Jul 2023 15:10:28 +0000 Subject: [PATCH] Reverse polarity to avoid an overlong line --- lib/libcrypto/ecdh/ech_key.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/ecdh/ech_key.c b/lib/libcrypto/ecdh/ech_key.c index f7a73f795d7..8418073f8ac 100644 --- a/lib/libcrypto/ecdh/ech_key.c +++ b/lib/libcrypto/ecdh/ech_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ech_key.c,v 1.28 2023/07/01 15:09:54 tb Exp $ */ +/* $OpenBSD: ech_key.c,v 1.29 2023/07/01 15:10:28 tb Exp $ */ /* ==================================================================== * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. * @@ -185,10 +185,11 @@ ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *eckey, void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)) { - if (eckey->meth->compute_key != NULL) - return eckey->meth->compute_key(out, outlen, pub_key, eckey, KDF); - ECerror(EC_R_NOT_IMPLEMENTED); - return 0; + if (eckey->meth->compute_key == NULL) { + ECerror(EC_R_NOT_IMPLEMENTED); + return 0; + } + return eckey->meth->compute_key(out, outlen, pub_key, eckey, KDF); } int -- 2.20.1