summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-03-24 11:43:41 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-03-24 11:43:41 +0000
commit70efe0d869583bb589a6fd9d4ec8d81f50e1f7f2 (patch)
treee47500d53b0639ce9f72e9dff6596ab02725cadb /sys
parentc5ee8db66e93d5b5f9c0437e21ffeb0bf17ad246 (diff)
ansi and tiny knf
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/crypto/blf.c22
-rw-r--r--sys/crypto/deflate.c16
2 files changed, 12 insertions, 26 deletions
diff --git a/sys/crypto/blf.c b/sys/crypto/blf.c
index 02793f30090..4046dd62450 100644
--- a/sys/crypto/blf.c
+++ b/sys/crypto/blf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: blf.c,v 1.5 2003/04/09 21:23:51 markus Exp $ */
+/* $OpenBSD: blf.c,v 1.6 2005/03/24 11:43:40 hshoexer Exp $ */
/*
* Blowfish block cipher for OpenBSD
@@ -62,9 +62,7 @@
#define BLFRND(s,p,i,j,n) (i ^= F(s,j) ^ (p)[n])
void
-Blowfish_encipher(c, x)
- blf_ctx *c;
- u_int32_t *x;
+Blowfish_encipher(blf_ctx *c, u_int32_t *x)
{
u_int32_t Xl;
u_int32_t Xr;
@@ -89,9 +87,7 @@ Blowfish_encipher(c, x)
}
void
-Blowfish_decipher(c, x)
- blf_ctx *c;
- u_int32_t *x;
+Blowfish_decipher(blf_ctx *c, u_int32_t *x)
{
u_int32_t Xl;
u_int32_t Xr;
@@ -116,11 +112,9 @@ Blowfish_decipher(c, x)
}
void
-Blowfish_initstate(c)
- blf_ctx *c;
+Blowfish_initstate(blf_ctx *c)
{
-
-/* P-box and S-box tables initialized with digits of Pi */
+ /* P-box and S-box tables initialized with digits of Pi */
static const blf_ctx initstate =
@@ -395,11 +389,11 @@ Blowfish_initstate(c)
} };
*c = initstate;
-
}
u_int32_t
-Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current)
+Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes,
+ u_int16_t *current)
{
u_int8_t i;
u_int16_t j;
@@ -457,7 +451,7 @@ Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
void
Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
- const u_int8_t *key, u_int16_t keybytes)
+ const u_int8_t *key, u_int16_t keybytes)
{
u_int16_t i;
u_int16_t j;
diff --git a/sys/crypto/deflate.c b/sys/crypto/deflate.c
index 73d8689465a..7592ef28dbc 100644
--- a/sys/crypto/deflate.c
+++ b/sys/crypto/deflate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */
+/* $OpenBSD: deflate.c,v 1.4 2005/03/24 11:43:40 hshoexer Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -48,11 +48,7 @@ int window_deflate = -12;
*/
u_int32_t
-deflate_global(data, size, comp, out)
- u_int8_t *data;
- u_int32_t size;
- int comp;
- u_int8_t **out;
+deflate_global(u_int8_t *data, u_int32_t size, int comp, u_int8_t **out)
{
/* comp indicates whether we compress (0) or decompress (1) */
@@ -168,9 +164,7 @@ bad:
}
void *
-z_alloc(nil, type, size)
- void *nil;
- u_int type, size;
+z_alloc(void *nil, u_int type, u_int size)
{
void *ptr;
@@ -179,9 +173,7 @@ z_alloc(nil, type, size)
}
void
-z_free(nil, ptr, size)
- void *nil, *ptr;
- u_int size;
+z_free(void *nil, void *ptr, u_int size)
{
free(ptr, M_CRYPTO_DATA);
}