]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Convert 24 more function definitions to prototype style (array parameters).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 20 Oct 2015 11:51:03 +0000 (11:51 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 20 Oct 2015 11:51:03 +0000 (11:51 +0000)
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.

25 files changed:
ChangeLog
crypt/cert.c
io/pipe.c
io/pipe2.c
misc/futimesat.c
misc/utimes.c
posix/execve.c
posix/execvp.c
posix/execvpe.c
posix/fexecve.c
socket/socketpair.c
stdlib/drand48-iter.c
stdlib/erand48.c
stdlib/erand48_r.c
stdlib/jrand48.c
stdlib/jrand48_r.c
stdlib/lcong48.c
stdlib/lcong48_r.c
stdlib/nrand48.c
stdlib/nrand48_r.c
stdlib/seed48.c
stdlib/seed48_r.c
sysdeps/mach/hurd/execve.c
sysdeps/mach/hurd/utimes.c
sysdeps/unix/sysv/linux/fexecve.c

index 4e886597b0de54111e9573b248d51908528f6ad6..14c98e84944dfcaecf5fd961a559c2425875b546 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2015-10-20  Joseph Myers  <joseph@codesourcery.com>
+
+       * 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.
+
 2015-10-19  Joseph Myers  <joseph@codesourcery.com>
 
        * configure.ac (libc_cv_asm_unique_object): Remove configure test.
index d651108860f0052a8e48548536a338fcd5c46899..80029e9078c1cdc04bf8c30c7f06d071be354fc0 100644 (file)
@@ -30,9 +30,7 @@ good_bye (void)
 }
 
 int
-main(argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
        char key[64],plain[64],cipher[64],answer[64];
        int i;
index 8cc20f1ae0bf36d5faa668310118229a168d1d05..0377ac1b183b8f60390e445cfabcb7b1835e988f 100644 (file)
--- a/io/pipe.c
+++ b/io/pipe.c
@@ -24,8 +24,7 @@
    bytes written on PIPEDES[1] can be read from PIPEDES[0].
    Returns 0 if successful, -1 if not.  */
 int
-__pipe (__pipedes)
-     int __pipedes[2];
+__pipe (int __pipedes[2])
 {
   if (__pipedes == NULL)
     {
index d06ed7af9f262ca487b8c4fe156084b7ed830087..cb7805c1de92572e79b518929136bff8592dfd74 100644 (file)
@@ -24,9 +24,7 @@
    PIPEDES[1] can be read from PIPEDES[0].  Apply FLAGS to the new
    file descriptors.  Returns 0 if successful, -1 if not.  */
 int
-__pipe2 (pipedes, flags)
-     int pipedes[2];
-     int flags;
+__pipe2 (int pipedes[2], int flags)
 {
   if (pipedes == NULL)
     {
index c675aa5ef1db8bc51a24d5e08f557a4d02ef460c..118f6c68125543aa926b9287fd109a3658b61f10 100644 (file)
 /* Change the access time of FILE relative to FD to TVP[0] and
    the modification time of FILE to TVP[1].  */
 int
-futimesat (fd, file, tvp)
-     int fd;
-     const char *file;
-     const struct timeval tvp[2];
+futimesat (int fd, const char *file, const struct timeval tvp[2])
 {
   if (fd < 0
       && (file == NULL
index 6b969e7b50742458d503415eaca176d9c3a16387..c8d6f58e8e2905b7ed2b22c64586e6e84ab29c1a 100644 (file)
@@ -22,9 +22,7 @@
 /* Change the access time of FILE to TVP[0] and
    the modification time of FILE to TVP[1].  */
 int
-__utimes (file, tvp)
-     const char *file;
-     const struct timeval tvp[2];
+__utimes (const char *file, const struct timeval tvp[2])
 {
   if (file == NULL)
     {
index 4f8adcf27153dced7bae86d6941cd5cafe2dda6c..fcf5fa01ecd08b35a6059853b76f0ae364059ab4 100644 (file)
 /* Replace the current process, executing PATH with arguments ARGV and
    environment ENVP.  ARGV and ENVP are terminated by NULL pointers.  */
 int
-__execve (path, argv, envp)
-     const char *path;
-     char *const argv[];
-     char *const envp[];
+__execve (const char *path, char *const argv[], char *const envp[])
 {
   if (path == NULL || argv == NULL || envp == NULL)
     {
index fa0313911bc4f68b7cc5fb1c9dddad472644cb75..586bfd513f90ac1d076178979350b49f5d8e5147 100644 (file)
@@ -21,9 +21,7 @@
 /* Execute FILE, searching in the `PATH' environment variable if it contains
    no slashes, with arguments ARGV and environment from `environ'.  */
 int
-execvp (file, argv)
-     const char *file;
-     char *const argv[];
+execvp (const char *file, char *const argv[])
 {
   return __execvpe (file, argv, __environ);
 }
index 5170e043d7aa0cb584ce2d9c971e0b44b934d41e..b51c107775f15b238fd5d79af1205c2bd984d81a 100644 (file)
@@ -45,10 +45,7 @@ scripts_argv (const char *file, char *const argv[], int argc, char **new_argv)
 /* Execute FILE, searching in the `PATH' environment variable if it contains
    no slashes, with arguments ARGV and environment from ENVP.  */
 int
-__execvpe (file, argv, envp)
-     const char *file;
-     char *const argv[];
-     char *const envp[];
+__execvpe (const char *file, char *const argv[], char *const envp[])
 {
   if (*file == '\0')
     {
index 95c8385bcd1f9ee62ef3da1241eea346f38c1a1f..a5505f458adf7a186d0c0f5e6fd15c8f7c44dd80 100644 (file)
 /* Execute the file FD refers to, overlaying the running program image.
    ARGV and ENVP are passed to the new program, as for `execve'.  */
 int
-fexecve (fd, argv, envp)
-     int fd;
-     char *const argv[];
-     char *const envp[];
+fexecve (int fd, char *const argv[], char *const envp[])
 {
   if (fd < 0 || argv == NULL || envp == NULL)
     {
index e0948f03bbb6af867cef84d515f4ccd48c34225f..646c46b56b2378f7f12176391470aba00f6e67fd 100644 (file)
    descriptors for them in FDS[0] and FDS[1].  If PROTOCOL is zero,
    one will be chosen automatically.  Returns 0 on success, -1 for errors.  */
 int
-socketpair (domain, type, protocol, fds)
-     int domain;
-     int type;
-     int protocol;
-     int fds[2];
+socketpair (int domain, int type, int protocol, int fds[2])
 {
   __set_errno (ENOSYS);
   return -1;
index 89837764105778f3fce737ec92052358a0decfe1..90ec1a1d3f9c8d0ca60b4b0c7ee9d434e9ff648d 100644 (file)
@@ -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;
index 66af9036d9a107caddebad21fa799344dbe010be..5655c72d08c8949c202f1e129ff740042c93286b 100644 (file)
@@ -20,8 +20,7 @@
 
 
 double
-erand48 (xsubi)
-     unsigned short int xsubi[3];
+erand48 (unsigned short int xsubi[3])
 {
   double result;
 
index ee554a5069b2513bce4cd10c3593458c8f40e750..61ed85217edc1c914b6c77cfd254f056559cb2b1 100644 (file)
 
 
 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;
 
index 63683d75c47979c570449190b2efe9d18312bd5e..d53224cff4e35a97ae345944e62888c0a4473aac 100644 (file)
@@ -20,8 +20,7 @@
 
 
 long int
-jrand48 (xsubi)
-     unsigned short int xsubi[3];
+jrand48 (unsigned short int xsubi[3])
 {
   long int result;
 
index 6dfd8aef4938741e2aa73383e469159b6fd589b1..2da4c52b8058634cf932eaa958bb830af19f6122 100644 (file)
 #include <stdlib.h>
 
 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)
index 14d29704ac167fffb8da4e8d2c392589961eb38b..be0f024305e07ca987d9b0e2992729117e7b4340 100644 (file)
@@ -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);
 }
index 5accc0853846608191d93124873afd68a67e56b8..e3e82e833f3a22ca7d303e6287354df460474593 100644 (file)
@@ -22,9 +22,7 @@
 #include <limits.h>
 
 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, &param[0], sizeof (buffer->__x));
index a13b3ba64332b19bbc24a76d77c76fe83cc81456..e15f0c0e2e2ca8af95bc611bacc6829f5959c4b5 100644 (file)
@@ -20,8 +20,7 @@
 
 
 long int
-nrand48 (xsubi)
-     unsigned short int xsubi[3];
+nrand48 (unsigned short int xsubi[3])
 {
   long int result;
 
index 3b1797f24ef386386d698994b4b904c8a90580b1..ee4476bc94c93e9c4d33773b4e3b41f518be4ec8 100644 (file)
 #include <stdlib.h>
 
 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)
index 4e7f5b7e8a42c25b428cad66a99ee63c6d3eb82e..e3923e3787d34682b982b727bd7431ff5fa2d43e 100644 (file)
@@ -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);
 
index a07b501b032bfc90b16122cf14aebee3a324d1dc..3056169d71439c7112f0f359ac93e59e086bc22a 100644 (file)
@@ -21,9 +21,7 @@
 #include <limits.h>
 
 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));
index 00c91c3ee23cbd4aac509d289f97231064288d57..4e37cb65b14352fd2a66ea57701477e7ef5687db 100644 (file)
 /* Replace the current process, executing FILE_NAME with arguments ARGV and
    environment ENVP.  ARGV and ENVP are terminated by NULL pointers.  */
 int
-__execve (file_name, argv, envp)
-     const char *file_name;
-     char *const argv[];
-     char *const envp[];
+__execve (const char *file_name, char *const argv[], char *const envp[])
 {
   error_t err;
   file_t file = __file_name_lookup (file_name, O_EXEC, 0);
index e456aecbd4729c958ce97f1442f57720a6e5e087..a379d992b1ee0b48969a3cba399823652b96baa0 100644 (file)
@@ -23,9 +23,7 @@
 /* Change the access time of FILE to TVP[0] and
    the modification time of FILE to TVP[1].  */
 int
-__utimes (file, tvp)
-     const char *file;
-     const struct timeval tvp[2];
+__utimes (const char *file, const struct timeval tvp[2])
 {
   union tv
   {
index 7e028a52c1fcdd9442f2ea2789491598f1388ad8..0fbfac2964189708c82f7163a53f4a8894380375 100644 (file)
 /* Execute the file FD refers to, overlaying the running program image.
    ARGV and ENVP are passed to the new program, as for `execve'.  */
 int
-fexecve (fd, argv, envp)
-     int fd;
-     char *const argv[];
-     char *const envp[];
+fexecve (int fd, char *const argv[], char *const envp[])
 {
   if (fd < 0 || argv == NULL || envp == NULL)
     {