diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-11-29 19:45:47 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-11-29 19:45:47 +0000 |
| commit | 982b28523234d8813ed7f8af05c116bda4cd60bd (patch) | |
| tree | e27cd2698d512a5b4ceeec475fb238daa90cdcc2 /llvm/tools/gccld/gccld.cpp | |
| parent | 3edb8478a4da14dbb7bd13197d7906ac7e6d2d5a (diff) | |
| download | bcm5719-llvm-982b28523234d8813ed7f8af05c116bda4cd60bd.tar.gz bcm5719-llvm-982b28523234d8813ed7f8af05c116bda4cd60bd.zip | |
Fix compatibility with gcc 3.4
llvm-svn: 10262
Diffstat (limited to 'llvm/tools/gccld/gccld.cpp')
| -rw-r--r-- | llvm/tools/gccld/gccld.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/tools/gccld/gccld.cpp b/llvm/tools/gccld/gccld.cpp index 176679b02ff..4c32c18089a 100644 --- a/llvm/tools/gccld/gccld.cpp +++ b/llvm/tools/gccld/gccld.cpp @@ -129,9 +129,7 @@ char ** CopyEnv(char ** const envp) { // Count the number of entries in the old list; unsigned entries; // The number of entries in the old environment list for (entries = 0; envp[entries] != NULL; entries++) - { - ; - } + /*empty*/; // Add one more entry for the NULL pointer that ends the list. ++entries; @@ -141,8 +139,8 @@ char ** CopyEnv(char ** const envp) { return NULL; // Allocate a new environment list. - char **newenv; - if ((newenv = new (char *) [entries]) == NULL) + char **newenv = new char* [entries]; + if ((newenv = new char* [entries]) == NULL) return NULL; // Make a copy of the list. Don't forget the NULL that ends the list. |

