mirror of
https://github.com/openssl/openssl.git
synced 2024-11-29 04:55:11 +08:00
Include rand.h so RAND_pseudo_bytes may be declared.
Remove one ampersand so the compiler may complain less. Make rand() static so it will not conflict with the C RTL. Make bug() static too, for good measure.
This commit is contained in:
parent
c257cce913
commit
4ba48ec4d0
@ -1,13 +1,14 @@
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
int rand(n)
|
||||
static int rand(n)
|
||||
{
|
||||
unsigned char x[2];
|
||||
RAND_pseudo_bytes(&x,2);
|
||||
RAND_pseudo_bytes(x,2);
|
||||
return (x[0] + 2*x[1]);
|
||||
}
|
||||
|
||||
void bug(char *m, BIGNUM *a, BIGNUM *b)
|
||||
static void bug(char *m, BIGNUM *a, BIGNUM *b)
|
||||
{
|
||||
printf("%s!\na=",m);
|
||||
BN_print_fp(stdout, a);
|
||||
|
Loading…
Reference in New Issue
Block a user