diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/rand | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) |
Change functions to ANSI C.
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/md_rand.c | 12 | ||||
-rw-r--r-- | crypto/rand/rand_lib.c | 15 | ||||
-rw-r--r-- | crypto/rand/randfile.c | 11 |
3 files changed, 12 insertions, 26 deletions
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index e96c103a68..dbf13e686f 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -140,12 +140,12 @@ RAND_METHOD rand_ssleay_meth={ ssleay_rand_cleanup, }; -RAND_METHOD *RAND_SSLeay() +RAND_METHOD *RAND_SSLeay(void) { return(&rand_ssleay_meth); } -static void ssleay_rand_cleanup() +static void ssleay_rand_cleanup(void) { memset(state,0,sizeof(state)); state_num=0; @@ -155,9 +155,7 @@ static void ssleay_rand_cleanup() md_count[1]=0; } -static void ssleay_rand_seed(buf,num) -const void *buf; -int num; +static void ssleay_rand_seed(const void *buf, int num) { int i,j,k,st_idx,st_num; MD_CTX m; @@ -219,9 +217,7 @@ int num; memset((char *)&m,0,sizeof(m)); } -static void ssleay_rand_bytes(buf,num) -unsigned char *buf; -int num; +static void ssleay_rand_bytes(unsigned char *buf, int num) { int i,j,k,st_num,st_idx; MD_CTX m; diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 6bea09211c..2eb5e12182 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -68,34 +68,29 @@ extern RAND_METHOD rand_ssleay_meth; static RAND_METHOD *rand_meth= &rand_ssleay_meth; #endif -void RAND_set_rand_method(meth) -RAND_METHOD *meth; +void RAND_set_rand_method(RAND_METHOD *meth) { rand_meth=meth; } -RAND_METHOD *RAND_get_rand_method() +RAND_METHOD *RAND_get_rand_method(void) { return(rand_meth); } -void RAND_cleanup() +void RAND_cleanup(void) { if (rand_meth != NULL) rand_meth->cleanup(); } -void RAND_seed(buf,num) -const void *buf; -int num; +void RAND_seed(const void *buf, int num) { if (rand_meth != NULL) rand_meth->seed(buf,num); } -void RAND_bytes(buf,num) -unsigned char *buf; -int num; +void RAND_bytes(unsigned char *buf, int num) { if (rand_meth != NULL) rand_meth->bytes(buf,num); diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index c8744318f6..1cea7696f9 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -71,9 +71,7 @@ /* #define RFILE ".rand" - defined in ../../e_os.h */ -int RAND_load_file(file,bytes) -const char *file; -long bytes; +int RAND_load_file(const char *file, long bytes) { MS_STATIC unsigned char buf[BUFSIZE]; struct stat sb; @@ -108,8 +106,7 @@ err: return(ret); } -int RAND_write_file(file) -const char *file; +int RAND_write_file(const char *file) { unsigned char buf[BUFSIZE]; int i,ret=0; @@ -140,9 +137,7 @@ err: return(ret); } -char *RAND_file_name(buf,size) -char *buf; -int size; +char *RAND_file_name(char *buf, int size) { char *s; char *ret=NULL; |