diff options
author | tb <> | 2023-04-18 18:29:32 +0000 |
---|---|---|
committer | tb <> | 2023-04-18 18:29:32 +0000 |
commit | 0aeb12748acb6b4c8e28de80f588e344c1dab0fe (patch) | |
tree | 86502ded19af6f71266b8423a893b56a849e8982 /src/lib | |
parent | fa0eef3357053f44676cc3e2789df44e2b301f22 (diff) | |
download | openbsd-0aeb12748acb6b4c8e28de80f588e344c1dab0fe.tar.gz openbsd-0aeb12748acb6b4c8e28de80f588e344c1dab0fe.tar.bz2 openbsd-0aeb12748acb6b4c8e28de80f588e344c1dab0fe.zip |
Use NULL, not 0 for pointers and use an explicit comparison against NULL.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_oct.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ecp_oct.c b/src/lib/libcrypto/ec/ecp_oct.c index 8cdf544bf1..b3cf44165d 100644 --- a/src/lib/libcrypto/ec/ecp_oct.c +++ b/src/lib/libcrypto/ec/ecp_oct.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_oct.c,v 1.20 2023/04/11 18:58:20 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_oct.c,v 1.21 2023/04/18 18:29:32 tb Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -97,7 +97,7 @@ ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, | |||
97 | /* tmp1 := x^3 */ | 97 | /* tmp1 := x^3 */ |
98 | if (!BN_nnmod(x, x_, &group->field, ctx)) | 98 | if (!BN_nnmod(x, x_, &group->field, ctx)) |
99 | goto err; | 99 | goto err; |
100 | if (group->meth->field_decode == 0) { | 100 | if (group->meth->field_decode == NULL) { |
101 | /* field_{sqr,mul} work on standard representation */ | 101 | /* field_{sqr,mul} work on standard representation */ |
102 | if (!group->meth->field_sqr(group, tmp2, x_, ctx)) | 102 | if (!group->meth->field_sqr(group, tmp2, x_, ctx)) |
103 | goto err; | 103 | goto err; |
@@ -135,7 +135,7 @@ ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, | |||
135 | } | 135 | } |
136 | 136 | ||
137 | /* tmp1 := tmp1 + b */ | 137 | /* tmp1 := tmp1 + b */ |
138 | if (group->meth->field_decode) { | 138 | if (group->meth->field_decode != NULL) { |
139 | if (!group->meth->field_decode(group, tmp2, &group->b, ctx)) | 139 | if (!group->meth->field_decode(group, tmp2, &group->b, ctx)) |
140 | goto err; | 140 | goto err; |
141 | if (!BN_mod_add_quick(tmp1, tmp1, tmp2, &group->field)) | 141 | if (!BN_mod_add_quick(tmp1, tmp1, tmp2, &group->field)) |