summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2012-04-10 17:07:28 +0000
committerDJ Delorie <dj@delorie.com>2012-04-10 17:07:28 +0000
commit100e018be9d4113d5652a0584f91d8b5eebe3eb8 (patch)
treefffecd5bde02c203e0bebb76670d273ca2d26503 /libiberty
parentdaa08f4642a47d7fcda9b6d593b2a74feb538460 (diff)
downloadbinutils-redhat-100e018be9d4113d5652a0584f91d8b5eebe3eb8.tar.gz
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/pex-unix.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 4a3f803489..4f8bc3f288 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -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.
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index 8d5145c523..addf8ee23d 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;