diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_shift.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_shift.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_shift.c b/src/lib/libcrypto/bn/bn_shift.c index c2608f9f4a..70f785ea18 100644 --- a/src/lib/libcrypto/bn/bn_shift.c +++ b/src/lib/libcrypto/bn/bn_shift.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "bn_lcl.h" | 61 | #include "bn_lcl.h" |
62 | 62 | ||
63 | int BN_lshift1(BIGNUM *r, BIGNUM *a) | 63 | int BN_lshift1(BIGNUM *r, const BIGNUM *a) |
64 | { | 64 | { |
65 | register BN_ULONG *ap,*rp,t,c; | 65 | register BN_ULONG *ap,*rp,t,c; |
66 | int i; | 66 | int i; |
@@ -92,7 +92,7 @@ int BN_lshift1(BIGNUM *r, BIGNUM *a) | |||
92 | return(1); | 92 | return(1); |
93 | } | 93 | } |
94 | 94 | ||
95 | int BN_rshift1(BIGNUM *r, BIGNUM *a) | 95 | int BN_rshift1(BIGNUM *r, const BIGNUM *a) |
96 | { | 96 | { |
97 | BN_ULONG *ap,*rp,t,c; | 97 | BN_ULONG *ap,*rp,t,c; |
98 | int i; | 98 | int i; |
@@ -128,8 +128,8 @@ int BN_lshift(BIGNUM *r, const BIGNUM *a, int n) | |||
128 | BN_ULONG l; | 128 | BN_ULONG l; |
129 | 129 | ||
130 | r->neg=a->neg; | 130 | r->neg=a->neg; |
131 | if (bn_wexpand(r,a->top+(n/BN_BITS2)+1) == NULL) return(0); | ||
132 | nw=n/BN_BITS2; | 131 | nw=n/BN_BITS2; |
132 | if (bn_wexpand(r,a->top+nw+1) == NULL) return(0); | ||
133 | lb=n%BN_BITS2; | 133 | lb=n%BN_BITS2; |
134 | rb=BN_BITS2-lb; | 134 | rb=BN_BITS2-lb; |
135 | f=a->d; | 135 | f=a->d; |
@@ -153,7 +153,7 @@ int BN_lshift(BIGNUM *r, const BIGNUM *a, int n) | |||
153 | return(1); | 153 | return(1); |
154 | } | 154 | } |
155 | 155 | ||
156 | int BN_rshift(BIGNUM *r, BIGNUM *a, int n) | 156 | int BN_rshift(BIGNUM *r, const BIGNUM *a, int n) |
157 | { | 157 | { |
158 | int i,j,nw,lb,rb; | 158 | int i,j,nw,lb,rb; |
159 | BN_ULONG *t,*f; | 159 | BN_ULONG *t,*f; |