Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1032)

Unified Diff: libiberty/pex-unix.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libiberty/md5.c ('k') | libiberty/stack-limit.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libiberty/pex-unix.c
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index 8d5145c523e6950bcdae209d4c6933eed284daa5..addf8ee23dfa82bce2a172ce6b40eb15689dd0ca 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;
« no previous file with comments | « libiberty/md5.c ('k') | libiberty/stack-limit.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698