Patchwork [libiberty] : Adjust style in pex-unix.c(to_ptr32)

login
register
mail settings
Submitter Tristan Gingold
Date April 4, 2012, 8:44 a.m.
Message ID <4345B011-6D19-43E7-B9DA-85166E7F8BC4@adacore.com>
Download mbox | patch
Permalink /patch/150655/
State New
Headers show

Comments

Tristan Gingold - April 4, 2012, 8:44 a.m.
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.

Patch

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;