artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fa2f54
)
Simplify BN_set_negative().
author
jsing
<jsing@openbsd.org>
Mon, 13 Feb 2023 04:03:38 +0000
(
04:03
+0000)
committer
jsing
<jsing@openbsd.org>
Mon, 13 Feb 2023 04:03:38 +0000
(
04:03
+0000)
ok tb@
lib/libcrypto/bn/bn_lib.c
patch
|
blob
|
history
diff --git
a/lib/libcrypto/bn/bn_lib.c
b/lib/libcrypto/bn/bn_lib.c
index
5bfdacb
..
e00909b
100644
(file)
--- a/
lib/libcrypto/bn/bn_lib.c
+++ b/
lib/libcrypto/bn/bn_lib.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: bn_lib.c,v 1.7
2 2023/01/14 15:12:27
jsing Exp $ */
+/* $OpenBSD: bn_lib.c,v 1.7
3 2023/02/13 04:03:38
jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@
-728,12
+728,9
@@
BN_mask_bits(BIGNUM *a, int n)
}
void
-BN_set_negative(BIGNUM *
a, int b
)
+BN_set_negative(BIGNUM *
bn, int neg
)
{
- if (b && !BN_is_zero(a))
- a->neg = 1;
- else
- a->neg = 0;
+ bn->neg = (neg != 0) && !BN_is_zero(bn);
}
int