* [libiberty]: Adjust style in pex-unix.c(to_ptr32)
@ 2012-04-04 8:44 Tristan Gingold
0 siblings, 0 replies; only message in thread
From: Tristan Gingold @ 2012-04-04 8:44 UTC (permalink / raw)
To: GCC Patches
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-04 8:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-04 8:44 [libiberty]: Adjust style in pex-unix.c(to_ptr32) Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).