From c1a969777ff9f9dc0a92b69a261df0232e376009 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 4 Apr 2012 08:44:30 +0000 Subject: [PATCH] pex-unix.c (to_ptr32): Fix style. 2012-04-04 Tristan Gingold * pex-unix.c (to_ptr32): Fix style. From-SVN: r186134 --- libiberty/ChangeLog | 4 ++++ libiberty/pex-unix.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 4a3f8034892..4f8bc3f2888 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2012-04-04 Tristan Gingold + + * pex-unix.c (to_ptr32): Fix style. + 2012-04-02 Tristan Gingold * stack-limit.c: Includes ansidecl.h. diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c index 8d5145c523e..addf8ee23df 100644 --- a/libiberty/pex-unix.c +++ b/libiberty/pex-unix.c @@ -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;