git: b38688df1d0c - main - libmd: ansify
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Mar 2023 19:03:07 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b38688df1d0c653ef0596ed5ca02ddb77f73c46c commit b38688df1d0c653ef0596ed5ca02ddb77f73c46c Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-03-16 19:02:56 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-03-16 19:02:56 +0000 libmd: ansify Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libmd/rmd160c.c | 24 ++++++------------------ lib/libmd/sha0c.c | 21 +++++---------------- lib/libmd/sha1c.c | 21 +++++---------------- 3 files changed, 16 insertions(+), 50 deletions(-) diff --git a/lib/libmd/rmd160c.c b/lib/libmd/rmd160c.c index fa58b7b8735f..d48f2677142f 100644 --- a/lib/libmd/rmd160c.c +++ b/lib/libmd/rmd160c.c @@ -88,8 +88,7 @@ void ripemd160_block_x86(RIPEMD160_CTX *c, const u_int32_t *p,int num); void ripemd160_block(RIPEMD160_CTX *c, const u_int32_t *p,int num); #endif -void RIPEMD160_Init(c) -RIPEMD160_CTX *c; +void RIPEMD160_Init(RIPEMD160_CTX *c) { c->A=RIPEMD160_A; c->B=RIPEMD160_B; @@ -101,10 +100,7 @@ RIPEMD160_CTX *c; c->num=0; } -void RIPEMD160_Update(c, in, len) -RIPEMD160_CTX *c; -const void *in; -size_t len; +void RIPEMD160_Update(RIPEMD160_CTX *c, const void *in, size_t len) { u_int32_t *p; int sw,sc; @@ -233,9 +229,7 @@ size_t len; } } -void RIPEMD160_Transform(c,b) -RIPEMD160_CTX *c; -unsigned char *b; +void RIPEMD160_Transform(RIPEMD160_CTX *c, unsigned char *b) { u_int32_t p[16]; #if BYTE_ORDER != LITTLE_ENDIAN @@ -272,10 +266,7 @@ unsigned char *b; #ifndef RMD160_ASM -void ripemd160_block(ctx, X, num) -RIPEMD160_CTX *ctx; -const u_int32_t *X; -int num; +void ripemd160_block(RIPEMD160_CTX *ctx, const u_int32_t *X, int num) { u_int32_t A,B,C,D,E; u_int32_t a,b,c,d,e; @@ -472,9 +463,7 @@ int num; } #endif -void RIPEMD160_Final(md, c) -unsigned char *md; -RIPEMD160_CTX *c; +void RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c) { int i,j; u_int32_t l; @@ -528,8 +517,7 @@ RIPEMD160_CTX *c; } #ifdef undef -int printit(l) -unsigned long *l; +int printit(unsigned long *l) { int i,ii; diff --git a/lib/libmd/sha0c.c b/lib/libmd/sha0c.c index 438c3a4852ff..e9f83fbd4e19 100644 --- a/lib/libmd/sha0c.c +++ b/lib/libmd/sha0c.c @@ -102,8 +102,7 @@ char *SHA_version="SHA part of SSLeay 0.9.0b 11-Oct-1998"; #define M_p_c2nl_p p_c2nl_p #define M_nl2c nl2c -void SHA_Init(c) -SHA_CTX *c; +void SHA_Init(SHA_CTX *c) { c->h0=INIT_DATA_h0; c->h1=INIT_DATA_h1; @@ -115,10 +114,7 @@ SHA_CTX *c; c->num=0; } -void SHA_Update(c, in, len) -SHA_CTX *c; -const void *in; -size_t len; +void SHA_Update(SHA_CTX *c, const void *in, size_t len) { u_int32_t *p; int ew,ec,sw,sc; @@ -249,9 +245,7 @@ size_t len; p[sw]=l; } -void SHA_Transform(c,b) -SHA_CTX *c; -unsigned char *b; +void SHA_Transform(SHA_CTX *c, unsigned char *b) { u_int32_t p[16]; #if BYTE_ORDER == LITTLE_ENDIAN @@ -286,10 +280,7 @@ unsigned char *b; sha_block(c,p,64); } -void sha_block(c, W, num) -SHA_CTX *c; -const u_int32_t *W; -int num; +void sha_block(SHA_CTX *c, const u_int32_t *W, int num) { u_int32_t A,B,C,D,E,T; u_int32_t X[16]; @@ -405,9 +396,7 @@ int num; } } -void SHA_Final(md, c) -unsigned char *md; -SHA_CTX *c; +void SHA_Final(unsigned char *md, SHA_CTX *c) { int i,j; u_int32_t l; diff --git a/lib/libmd/sha1c.c b/lib/libmd/sha1c.c index 870af2ab1556..871b7a8012dc 100644 --- a/lib/libmd/sha1c.c +++ b/lib/libmd/sha1c.c @@ -129,8 +129,7 @@ char *SHA1_version="SHA1 part of SSLeay 0.9.0b 11-Oct-1998"; # define M_nl2c nl2c #endif -void SHA1_Init(c) -SHA_CTX *c; +void SHA1_Init(SHA_CTX *c) { c->h0=INIT_DATA_h0; c->h1=INIT_DATA_h1; @@ -143,10 +142,7 @@ SHA_CTX *c; } void -SHA1_Update(c, in, len) - SHA_CTX *c; - const void *in; - size_t len; +SHA1_Update(SHA_CTX *c, const void *in, size_t len) { u_int32_t *p; int ew,ec,sw,sc; @@ -277,9 +273,7 @@ SHA1_Update(c, in, len) p[sw]=l; } -void SHA1_Transform(c,b) -SHA_CTX *c; -unsigned char *b; +void SHA1_Transform(SHA_CTX *c, unsigned char *b) { u_int32_t p[16]; #if BYTE_ORDER != BIG_ENDIAN @@ -317,10 +311,7 @@ unsigned char *b; #ifndef SHA1_ASM void -sha1_block(c, W, num) - SHA_CTX *c; - const u_int32_t *W; - int num; +sha1_block(SHA_CTX *c, const u_int32_t *W, int num) { u_int32_t A,B,C,D,E,T; u_int32_t X[16]; @@ -437,9 +428,7 @@ sha1_block(c, W, num) } #endif -void SHA1_Final(md, c) -unsigned char *md; -SHA_CTX *c; +void SHA1_Final(unsigned char *md, SHA_CTX *c) { int i,j; u_int32_t l;