Skip to content

Commit

Permalink
Constification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Laurie committed Oct 19, 2008
1 parent 640b86c commit 0d6f9c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crypto/bn/bn.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx);
void BN_CTX_end(BN_CTX *ctx);
int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
int BN_rand_range(BIGNUM *rnd, BIGNUM *range);
int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range);
int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
int BN_num_bits(const BIGNUM *a);
int BN_num_bits_word(BN_ULONG);
BIGNUM *BN_new(void);
Expand Down
6 changes: 3 additions & 3 deletions crypto/bn/bn_rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)


/* random number r: 0 <= r < range */
static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range)
{
int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand;
int n;
Expand Down Expand Up @@ -294,12 +294,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
}


int BN_rand_range(BIGNUM *r, BIGNUM *range)
int BN_rand_range(BIGNUM *r, const BIGNUM *range)
{
return bn_rand_range(0, r, range);
}

int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range)
int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range)
{
return bn_rand_range(1, r, range);
}

0 comments on commit 0d6f9c7

Please sign in to comment.