From a72ddc1424d5bfcab14d90f1149cbb9b492f0120 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 20 Oct 2015 11:51:03 +0000 Subject: Convert 24 more function definitions to prototype style (array parameters). This automatically-generated patch converts 24 function definitions in glibc from old-style K&R to prototype-style. Following my other recent such patches, this one deals with the case of functions with array parameters. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). * crypt/cert.c (main): Convert to prototype-style function definition. * io/pipe.c (__pipe): Likewise. * io/pipe2.c (__pipe2): Likewise. * misc/futimesat.c (futimesat): Likewise. * misc/utimes.c (__utimes): Likewise. * posix/execve.c (__execve): Likewise. * posix/execvp.c (execvp): Likewise. * posix/execvpe.c (__execvpe): Likewise. * posix/fexecve.c (fexecve): Likewise. * socket/socketpair.c (socketpair): Likewise. * stdlib/drand48-iter.c (__drand48_iterate): Likewise. * stdlib/erand48.c (erand48): Likewise. * stdlib/erand48_r.c (__erand48_r): Likewise. * stdlib/jrand48.c (jrand48): Likewise. * stdlib/jrand48_r.c (__jrand48_r): Likewise. * stdlib/lcong48.c (lcong48): Likewise. * stdlib/lcong48_r.c (__lcong48_r): Likewise. * stdlib/nrand48.c (nrand48): Likewise. * stdlib/nrand48_r.c (__nrand48_r): Likewise. * stdlib/seed48.c (seed48): Likewise. * stdlib/seed48_r.c (__seed48_r): Likewise. * sysdeps/mach/hurd/execve.c (__execve): Likewise. * sysdeps/mach/hurd/utimes.c (__utimes): Likewise. * sysdeps/unix/sysv/linux/fexecve.c (fexecve): Likewise. --- stdlib/drand48-iter.c | 4 +--- stdlib/erand48.c | 3 +-- stdlib/erand48_r.c | 6 ++---- stdlib/jrand48.c | 3 +-- stdlib/jrand48_r.c | 6 ++---- stdlib/lcong48.c | 3 +-- stdlib/lcong48_r.c | 4 +--- stdlib/nrand48.c | 3 +-- stdlib/nrand48_r.c | 6 ++---- stdlib/seed48.c | 3 +-- stdlib/seed48_r.c | 4 +--- 11 files changed, 14 insertions(+), 31 deletions(-) (limited to 'stdlib') diff --git a/stdlib/drand48-iter.c b/stdlib/drand48-iter.c index 8983776..90ec1a1 100644 --- a/stdlib/drand48-iter.c +++ b/stdlib/drand48-iter.c @@ -27,9 +27,7 @@ struct drand48_data __libc_drand48_data; int -__drand48_iterate (xsubi, buffer) - unsigned short int xsubi[3]; - struct drand48_data *buffer; +__drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) { uint64_t X; uint64_t result; diff --git a/stdlib/erand48.c b/stdlib/erand48.c index 66af903..5655c72 100644 --- a/stdlib/erand48.c +++ b/stdlib/erand48.c @@ -20,8 +20,7 @@ double -erand48 (xsubi) - unsigned short int xsubi[3]; +erand48 (unsigned short int xsubi[3]) { double result; diff --git a/stdlib/erand48_r.c b/stdlib/erand48_r.c index ee554a5..61ed852 100644 --- a/stdlib/erand48_r.c +++ b/stdlib/erand48_r.c @@ -22,10 +22,8 @@ int -__erand48_r (xsubi, buffer, result) - unsigned short int xsubi[3]; - struct drand48_data *buffer; - double *result; +__erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, + double *result) { union ieee754_double temp; diff --git a/stdlib/jrand48.c b/stdlib/jrand48.c index 63683d7..d53224c 100644 --- a/stdlib/jrand48.c +++ b/stdlib/jrand48.c @@ -20,8 +20,7 @@ long int -jrand48 (xsubi) - unsigned short int xsubi[3]; +jrand48 (unsigned short int xsubi[3]) { long int result; diff --git a/stdlib/jrand48_r.c b/stdlib/jrand48_r.c index 6dfd8ae..2da4c52 100644 --- a/stdlib/jrand48_r.c +++ b/stdlib/jrand48_r.c @@ -19,10 +19,8 @@ #include int -__jrand48_r (xsubi, buffer, result) - unsigned short int xsubi[3]; - struct drand48_data *buffer; - long int *result; +__jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, + long int *result) { /* Compute next state. */ if (__drand48_iterate (xsubi, buffer) < 0) diff --git a/stdlib/lcong48.c b/stdlib/lcong48.c index 14d2970..be0f024 100644 --- a/stdlib/lcong48.c +++ b/stdlib/lcong48.c @@ -20,8 +20,7 @@ void -lcong48 (param) - unsigned short int param[7]; +lcong48 (unsigned short int param[7]) { (void) __lcong48_r (param, &__libc_drand48_data); } diff --git a/stdlib/lcong48_r.c b/stdlib/lcong48_r.c index 5accc08..e3e82e8 100644 --- a/stdlib/lcong48_r.c +++ b/stdlib/lcong48_r.c @@ -22,9 +22,7 @@ #include int -__lcong48_r (param, buffer) - unsigned short int param[7]; - struct drand48_data *buffer; +__lcong48_r (unsigned short int param[7], struct drand48_data *buffer) { /* Store the given values. */ memcpy (buffer->__x, ¶m[0], sizeof (buffer->__x)); diff --git a/stdlib/nrand48.c b/stdlib/nrand48.c index a13b3ba..e15f0c0 100644 --- a/stdlib/nrand48.c +++ b/stdlib/nrand48.c @@ -20,8 +20,7 @@ long int -nrand48 (xsubi) - unsigned short int xsubi[3]; +nrand48 (unsigned short int xsubi[3]) { long int result; diff --git a/stdlib/nrand48_r.c b/stdlib/nrand48_r.c index 3b1797f..ee4476b 100644 --- a/stdlib/nrand48_r.c +++ b/stdlib/nrand48_r.c @@ -19,10 +19,8 @@ #include int -__nrand48_r (xsubi, buffer, result) - unsigned short int xsubi[3]; - struct drand48_data *buffer; - long int *result; +__nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, + long int *result) { /* Compute next state. */ if (__drand48_iterate (xsubi, buffer) < 0) diff --git a/stdlib/seed48.c b/stdlib/seed48.c index 4e7f5b7..e3923e3 100644 --- a/stdlib/seed48.c +++ b/stdlib/seed48.c @@ -20,8 +20,7 @@ unsigned short int * -seed48 (seed16v) - unsigned short int seed16v[3]; +seed48 (unsigned short int seed16v[3]) { (void) __seed48_r (seed16v, &__libc_drand48_data); diff --git a/stdlib/seed48_r.c b/stdlib/seed48_r.c index a07b501..3056169 100644 --- a/stdlib/seed48_r.c +++ b/stdlib/seed48_r.c @@ -21,9 +21,7 @@ #include int -__seed48_r (seed16v, buffer) - unsigned short int seed16v[3]; - struct drand48_data *buffer; +__seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer) { /* Save old value at a private place to be used as return value. */ memcpy (buffer->__old_x, buffer->__x, sizeof (buffer->__x)); -- cgit v1.1