summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-04-20 17:34:33 +0000
committertb <>2021-04-20 17:34:33 +0000
commita60599d2501d9d85725c7e4ff505f3cff6d75b5c (patch)
treedb34a98b729a2cb0e4ece3a1b0940c03f4fd384e /src
parente3bdd39cc031d39a8ea071c9a8ecea5b6a958967 (diff)
downloadopenbsd-a60599d2501d9d85725c7e4ff505f3cff6d75b5c.tar.gz
openbsd-a60599d2501d9d85725c7e4ff505f3cff6d75b5c.tar.bz2
openbsd-a60599d2501d9d85725c7e4ff505f3cff6d75b5c.zip
Compare pointer against NULL and fix a KNF issue.
ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ec/ec_oct.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_oct.c b/src/lib/libcrypto/ec/ec_oct.c
index a3a826d0f1..45968219de 100644
--- a/src/lib/libcrypto/ec/ec_oct.c
+++ b/src/lib/libcrypto/ec/ec_oct.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_oct.c,v 1.7 2021/04/20 17:32:57 tb Exp $ */ 1/* $OpenBSD: ec_oct.c,v 1.8 2021/04/20 17:34:33 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -74,8 +74,8 @@ int
74EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point, 74EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point,
75 const BIGNUM *x, int y_bit, BN_CTX *ctx) 75 const BIGNUM *x, int y_bit, BN_CTX *ctx)
76{ 76{
77 if (group->meth->point_set_compressed_coordinates == 0 77 if (group->meth->point_set_compressed_coordinates == NULL &&
78 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { 78 !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
79 ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); 79 ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
80 return 0; 80 return 0;
81 } 81 }