]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pex-unix.c (to_ptr32): Fix style.
authorTristan Gingold <gingold@adacore.com>
Wed, 4 Apr 2012 08:44:30 +0000 (08:44 +0000)
committerTristan Gingold <gingold@gcc.gnu.org>
Wed, 4 Apr 2012 08:44:30 +0000 (08:44 +0000)
2012-04-04  Tristan Gingold  <gingold@adacore.com>

* pex-unix.c (to_ptr32): Fix style.

From-SVN: r186134

libiberty/ChangeLog
libiberty/pex-unix.c

index 4a3f8034892f6c84bdc6c038c01357709686fef7..4f8bc3f2888c5f734358431361ebbaa822737250 100644 (file)
@@ -1,3 +1,7 @@
+2012-04-04  Tristan Gingold  <gingold@adacore.com>
+
+       * pex-unix.c (to_ptr32): Fix style.
+
 2012-04-02  Tristan Gingold  <gingold@adacore.com>
 
        * stack-limit.c: Includes ansidecl.h.
index 8d5145c523e6950bcdae209d4c6933eed284daa5..addf8ee23dfa82bce2a172ce6b40eb15689dd0ca 100644 (file)
@@ -85,13 +85,15 @@ to_ptr32 (char **ptr64)
   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;