Fix compatibility with gcc 3.4
authorChris Lattner <sabre@nondot.org>
Sat, 29 Nov 2003 19:45:47 +0000 (19:45 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 29 Nov 2003 19:45:47 +0000 (19:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10262 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccld/gccld.cpp

index 176679b02ff92845a446da8ab1545a2894fa723b..4c32c18089a977b27d4bfe9ab5298507690fd44f 100644 (file)
@@ -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.