This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libiberty]: Adjust style in pex-unix.c(to_ptr32)
- From: Tristan Gingold <gingold at adacore dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 4 Apr 2012 10:44:12 +0200
- Subject: [libiberty]: Adjust style in pex-unix.c(to_ptr32)
Hi,
I am committing this patch (as obvious) to adjust the style of the VMS specific function to_ptr32.
Tested by building for ia64-hp-openvms.
Tristan.
libiberty/
2012-04-04 Tristan Gingold <gingold@adacore.com>
* pex-unix.c (to_ptr32): Fix style.
Index: pex-unix.c
===================================================================
--- pex-unix.c (revision 186130)
+++ pex-unix.c (working copy)
@@ -85,13 +85,15 @@
int argc;
__char_ptr_char_ptr32 short_argv;
- for (argc=0; ptr64[argc]; argc++);
+ /* Count number of arguments. */
+ for (argc = 0; ptr64[argc] != NULL; argc++)
+ ;
/* Reallocate argv with 32 bit pointers. */
short_argv = (__char_ptr_char_ptr32) decc$malloc
(sizeof (__char_ptr32) * (argc + 1));
- for (argc=0; ptr64[argc]; argc++)
+ for (argc = 0; ptr64[argc] != NULL; argc++)
short_argv[argc] = (__char_ptr32) decc$strdup (ptr64[argc]);
short_argv[argc] = (__char_ptr32) 0;