about summary refs log tree commit diff
path: root/crypt
diff options
context:
space:
mode:
Diffstat (limited to 'crypt')
-rw-r--r--crypt/cert.c9
-rw-r--r--crypt/crypt-entry.c8
-rw-r--r--crypt/crypt_util.c46
-rw-r--r--crypt/md5.c25
-rw-r--r--crypt/sha256.c12
-rw-r--r--crypt/sha512.c12
6 files changed, 30 insertions, 82 deletions
diff --git a/crypt/cert.c b/crypt/cert.c
index 8c838e919a..d651108860 100644
--- a/crypt/cert.c
+++ b/crypt/cert.c
@@ -17,7 +17,8 @@ void get8 (char *cp);
 void put8 (char *cp);
 void good_bye (void) __attribute__ ((noreturn));
 
-void good_bye ()
+void
+good_bye (void)
 {
   if(totfails == 0) {
     printf("Passed DES validation suite\n");
@@ -80,8 +81,7 @@ main(argc, argv)
 	good_bye();
 }
 void
-get8(cp)
-char *cp;
+get8 (char *cp)
 {
 	int i,j,t;
 
@@ -95,8 +95,7 @@ char *cp;
 	}
 }
 void
-put8(cp)
-char *cp;
+put8 (char *cp)
 {
 	int i,j,t;
 
diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c
index 7e655badfb..73b369c8c1 100644
--- a/crypt/crypt-entry.c
+++ b/crypt/crypt-entry.c
@@ -148,9 +148,7 @@ __crypt_r (key, salt, data)
 weak_alias (__crypt_r, crypt_r)
 
 char *
-crypt (key, salt)
-     const char *key;
-     const char *salt;
+crypt (const char *key, const char *salt)
 {
 #ifdef _LIBC
   /* Try to find out whether we have to use MD5 encryption replacement.  */
@@ -180,9 +178,7 @@ crypt (key, salt)
 weak_alias (crypt, fcrypt)
 #else
 char *
-__fcrypt (key, salt)
-     const char *key;
-     const char *salt;
+__fcrypt (const char *key, const char *salt)
 {
   return crypt (key, salt);
 }
diff --git a/crypt/crypt_util.c b/crypt/crypt_util.c
index b96ecc8b6c..33d894a968 100644
--- a/crypt/crypt_util.c
+++ b/crypt/crypt_util.c
@@ -261,9 +261,7 @@ __libc_lock_define_initialized (static, _ufc_tables_lock)
 #ifdef DEBUG
 
 void
-_ufc_prbits(a, n)
-     ufc_long *a;
-     int n;
+_ufc_prbits (ufc_long *a, int n)
 {
   ufc_long i, j, t, tmp;
   n /= 8;
@@ -279,9 +277,7 @@ _ufc_prbits(a, n)
 }
 
 static void
-_ufc_set_bits(v, b)
-     ufc_long v;
-     ufc_long *b;
+_ufc_set_bits (ufc_long v, ufc_long *b)
 {
   ufc_long i;
   *b = 0;
@@ -301,9 +297,7 @@ _ufc_set_bits(v, b)
  */
 
 void
-_ufc_clearmem(start, cnt)
-     char *start;
-     int cnt;
+_ufc_clearmem (char *start, int cnt)
 {
   while(cnt--)
     *start++ = '\0';
@@ -332,8 +326,7 @@ _ufc_copymem(from, to, cnt)
  */
 
 void
-__init_des_r(__data)
-     struct crypt_data * __restrict __data;
+__init_des_r (struct crypt_data * __restrict __data)
 {
   int comes_from_bit;
   int bit, sg;
@@ -558,9 +551,7 @@ __init_des (void)
 
 #ifdef _UFC_32_
 STATIC void
-shuffle_sb(k, saltbits)
-     long32 *k;
-     ufc_long saltbits;
+shuffle_sb (long32 *k, ufc_long saltbits)
 {
   ufc_long j;
   long32 x;
@@ -574,9 +565,7 @@ shuffle_sb(k, saltbits)
 
 #ifdef _UFC_64_
 STATIC void
-shuffle_sb(k, saltbits)
-     long64 *k;
-     ufc_long saltbits;
+shuffle_sb (long64 *k, ufc_long saltbits)
 {
   ufc_long j;
   long64 x;
@@ -614,9 +603,7 @@ bad_for_salt (char c)
  */
 
 bool
-_ufc_setup_salt_r(s, __data)
-     const char *s;
-     struct crypt_data * __restrict __data;
+_ufc_setup_salt_r (const char *s, struct crypt_data * __restrict __data)
 {
   ufc_long i, j, saltbits;
   char s0, s1;
@@ -675,9 +662,7 @@ _ufc_setup_salt_r(s, __data)
 }
 
 void
-_ufc_mk_keytab_r(key, __data)
-     const char *key;
-     struct crypt_data * __restrict __data;
+_ufc_mk_keytab_r (const char *key, struct crypt_data * __restrict __data)
 {
   ufc_long v1, v2, *k1;
   int i;
@@ -735,9 +720,7 @@ _ufc_mk_keytab_r(key, __data)
  */
 
 void
-_ufc_dofinalperm_r(res, __data)
-     ufc_long *res;
-     struct crypt_data * __restrict __data;
+_ufc_dofinalperm_r (ufc_long *res, struct crypt_data * __restrict __data)
 {
   ufc_long v1, v2, x;
   ufc_long l1,l2,r1,r2;
@@ -910,9 +893,7 @@ __encrypt_r(__block, __edflag, __data)
 weak_alias (__encrypt_r, encrypt_r)
 
 void
-encrypt(__block, __edflag)
-     char *__block;
-     int __edflag;
+encrypt (char *__block, int __edflag)
 {
   __encrypt_r(__block, __edflag, &_ufc_foobar);
 }
@@ -924,9 +905,7 @@ encrypt(__block, __edflag)
  */
 
 void
-__setkey_r(__key, __data)
-     const char *__key;
-     struct crypt_data * __restrict __data;
+__setkey_r (const char *__key, struct crypt_data * __restrict __data)
 {
   int i,j;
   unsigned char c;
@@ -944,8 +923,7 @@ __setkey_r(__key, __data)
 weak_alias (__setkey_r, setkey_r)
 
 void
-setkey(__key)
-     const char *__key;
+setkey (const char *__key)
 {
   __setkey_r(__key, &_ufc_foobar);
 }
diff --git a/crypt/md5.c b/crypt/md5.c
index 3c447c5d43..5c48f52a4c 100644
--- a/crypt/md5.c
+++ b/crypt/md5.c
@@ -67,8 +67,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ...  */ };
 /* Initialize structure containing state of computation.
    (RFC 1321, 3.3: Step 3)  */
 void
-md5_init_ctx (ctx)
-     struct md5_ctx *ctx;
+md5_init_ctx (struct md5_ctx *ctx)
 {
   ctx->A = 0x67452301;
   ctx->B = 0xefcdab89;
@@ -85,9 +84,7 @@ md5_init_ctx (ctx)
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
 void *
-md5_read_ctx (ctx, resbuf)
-     const struct md5_ctx *ctx;
-     void *resbuf;
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
 {
   ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
   ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@ -103,9 +100,7 @@ md5_read_ctx (ctx, resbuf)
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
 void *
-md5_finish_ctx (ctx, resbuf)
-     struct md5_ctx *ctx;
-     void *resbuf;
+md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
 {
   /* Take yet unprocessed bytes into account.  */
   md5_uint32 bytes = ctx->buflen;
@@ -134,9 +129,7 @@ md5_finish_ctx (ctx, resbuf)
    resulting message digest number will be written into the 16 bytes
    beginning at RESBLOCK.  */
 int
-md5_stream (stream, resblock)
-     FILE *stream;
-     void *resblock;
+md5_stream (FILE *stream, void *resblock)
 {
   /* Important: BLOCKSIZE must be a multiple of 64.  */
 #define BLOCKSIZE 4096
@@ -191,10 +184,7 @@ md5_stream (stream, resblock)
    output yields to the wanted ASCII representation of the message
    digest.  */
 void *
-md5_buffer (buffer, len, resblock)
-     const char *buffer;
-     size_t len;
-     void *resblock;
+md5_buffer (const char *buffer, size_t len, void *resblock)
 {
   struct md5_ctx ctx;
 
@@ -210,10 +200,7 @@ md5_buffer (buffer, len, resblock)
 
 
 void
-md5_process_bytes (buffer, len, ctx)
-     const void *buffer;
-     size_t len;
-     struct md5_ctx *ctx;
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
 {
   /* When we already have some bits in our internal buffer concatenate
      both inputs first.  */
diff --git a/crypt/sha256.c b/crypt/sha256.c
index b6db8b2867..8241de5c19 100644
--- a/crypt/sha256.c
+++ b/crypt/sha256.c
@@ -87,8 +87,7 @@ sha256_process_block (const void *, size_t, struct sha256_ctx *);
 /* Initialize structure containing state of computation.
    (FIPS 180-2:5.3.2)  */
 void
-__sha256_init_ctx (ctx)
-     struct sha256_ctx *ctx;
+__sha256_init_ctx (struct sha256_ctx *ctx)
 {
   ctx->H[0] = 0x6a09e667;
   ctx->H[1] = 0xbb67ae85;
@@ -110,9 +109,7 @@ __sha256_init_ctx (ctx)
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
 void *
-__sha256_finish_ctx (ctx, resbuf)
-     struct sha256_ctx *ctx;
-     void *resbuf;
+__sha256_finish_ctx (struct sha256_ctx *ctx, void *resbuf)
 {
   /* Take yet unprocessed bytes into account.  */
   uint32_t bytes = ctx->buflen;
@@ -145,10 +142,7 @@ __sha256_finish_ctx (ctx, resbuf)
 
 
 void
-__sha256_process_bytes (buffer, len, ctx)
-     const void *buffer;
-     size_t len;
-     struct sha256_ctx *ctx;
+__sha256_process_bytes (const void *buffer, size_t len, struct sha256_ctx *ctx)
 {
   /* When we already have some bits in our internal buffer concatenate
      both inputs first.  */
diff --git a/crypt/sha512.c b/crypt/sha512.c
index 608de82daa..8aa3d0b1b7 100644
--- a/crypt/sha512.c
+++ b/crypt/sha512.c
@@ -107,8 +107,7 @@ sha512_process_block (const void *buffer, size_t len, struct sha512_ctx *ctx);
 /* Initialize structure containing state of computation.
    (FIPS 180-2:5.3.3)  */
 void
-__sha512_init_ctx (ctx)
-     struct sha512_ctx *ctx;
+__sha512_init_ctx (struct sha512_ctx *ctx)
 {
   ctx->H[0] = UINT64_C (0x6a09e667f3bcc908);
   ctx->H[1] = UINT64_C (0xbb67ae8584caa73b);
@@ -130,9 +129,7 @@ __sha512_init_ctx (ctx)
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
 void *
-__sha512_finish_ctx (ctx, resbuf)
-     struct sha512_ctx *ctx;
-     void *resbuf;
+__sha512_finish_ctx (struct sha512_ctx *ctx, void *resbuf)
 {
   /* Take yet unprocessed bytes into account.  */
   uint64_t bytes = ctx->buflen;
@@ -167,10 +164,7 @@ __sha512_finish_ctx (ctx, resbuf)
 
 
 void
-__sha512_process_bytes (buffer, len, ctx)
-     const void *buffer;
-     size_t len;
-     struct sha512_ctx *ctx;
+__sha512_process_bytes (const void *buffer, size_t len, struct sha512_ctx *ctx)
 {
   /* When we already have some bits in our internal buffer concatenate
      both inputs first.  */