Date: Tue, 3 Nov 2020 22:32:31 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367310 - in head/sys: crypto opencrypto Message-ID: <202011032232.0A3MWVh9038517@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Nov 3 22:32:30 2020 New Revision: 367310 URL: https://svnweb.freebsd.org/changeset/base/367310 Log: Replace some K&R function definitions with ANSI C. Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27062 Modified: head/sys/crypto/sha1.c head/sys/opencrypto/cryptodeflate.c head/sys/opencrypto/xform_deflate.c Modified: head/sys/crypto/sha1.c ============================================================================== --- head/sys/crypto/sha1.c Tue Nov 3 22:27:54 2020 (r367309) +++ head/sys/crypto/sha1.c Tue Nov 3 22:32:30 2020 (r367310) @@ -91,8 +91,7 @@ static uint32_t _K[] = { 0x5a827999, 0x6ed9eba1, 0x8f1 static void sha1_step(struct sha1_ctxt *); static void -sha1_step(ctxt) - struct sha1_ctxt *ctxt; +sha1_step(struct sha1_ctxt *ctxt) { uint32_t a, b, c, d, e; size_t t, s; @@ -176,8 +175,7 @@ sha1_step(ctxt) /*------------------------------------------------------------*/ void -sha1_init(ctxt) - struct sha1_ctxt *ctxt; +sha1_init(struct sha1_ctxt *ctxt) { bzero(ctxt, sizeof(struct sha1_ctxt)); H(0) = 0x67452301; @@ -188,8 +186,7 @@ sha1_init(ctxt) } void -sha1_pad(ctxt) - struct sha1_ctxt *ctxt; +sha1_pad(struct sha1_ctxt *ctxt) { size_t padlen; /*pad length in bytes*/ size_t padstart; @@ -223,10 +220,7 @@ sha1_pad(ctxt) } void -sha1_loop(ctxt, input, len) - struct sha1_ctxt *ctxt; - const uint8_t *input; - size_t len; +sha1_loop(struct sha1_ctxt *ctxt, const uint8_t *input, size_t len) { size_t gaplen; size_t gapstart; Modified: head/sys/opencrypto/cryptodeflate.c ============================================================================== --- head/sys/opencrypto/cryptodeflate.c Tue Nov 3 22:27:54 2020 (r367309) +++ head/sys/opencrypto/cryptodeflate.c Tue Nov 3 22:32:30 2020 (r367310) @@ -82,11 +82,7 @@ crypto_zfree(void *nil, void *ptr) */ uint32_t -deflate_global(data, size, decomp, out) - uint8_t *data; - uint32_t size; - int decomp; - uint8_t **out; +deflate_global(uint8_t *data, uint32_t size, int decomp, uint8_t **out) { /* decomp indicates whether we compress (0) or decompress (1) */ Modified: head/sys/opencrypto/xform_deflate.c ============================================================================== --- head/sys/opencrypto/xform_deflate.c Tue Nov 3 22:27:54 2020 (r367309) +++ head/sys/opencrypto/xform_deflate.c Tue Nov 3 22:32:30 2020 (r367310) @@ -68,19 +68,13 @@ struct comp_algo comp_algo_deflate = { */ static uint32_t -deflate_compress(data, size, out) - uint8_t *data; - uint32_t size; - uint8_t **out; +deflate_compress(uint8_t *data, uint32_t size, uint8_t **out) { return deflate_global(data, size, 0, out); } static uint32_t -deflate_decompress(data, size, out) - uint8_t *data; - uint32_t size; - uint8_t **out; +deflate_decompress(uint8_t *data, uint32_t size, uint8_t **out) { return deflate_global(data, size, 1, out); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011032232.0A3MWVh9038517>