]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
prefix.c (concat, lookup_key): Use xmalloc and xrealloc consistently.
authorNeil Booth <neilb@earthling.net>
Sun, 13 Feb 2000 19:59:29 +0000 (12:59 -0700)
committerJeff Law <law@gcc.gnu.org>
Sun, 13 Feb 2000 19:59:29 +0000 (12:59 -0700)
        * prefix.c (concat, lookup_key): Use xmalloc and xrealloc
        consistently.

From-SVN: r31958

gcc/ChangeLog
gcc/prefix.c

index 4e3bf23ff5092b292a3bc65b8641cc0250954a16..543524b9833d67abdc4f1d83fceb8471d8509a88 100644 (file)
@@ -1,3 +1,8 @@
+Sun Feb 13 12:57:52 2000  Neil Booth <NeilB@earthling.net>
+
+       * prefix.c (concat, lookup_key): Use xmalloc and xrealloc
+       consistently.
+
 2000-02-13  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
 
        * flow.c (flow_loop_tree_node_add): Use better algorithm by passing
index 88cff94e19422d5bed856ef051eb4c1478991053..a7336e0395d6d790430062ba818c795e293b46f6 100644 (file)
@@ -139,7 +139,7 @@ concat VPARAMS ((const char *first, ...))
       arg = va_arg (args, const char *);
     }
 
-  newstr = (char *) malloc (length + 1);
+  newstr = (char *) xmalloc (length + 1);
   va_end (args);
 
   /* Now copy the individual pieces to the result string.  */
@@ -211,12 +211,12 @@ lookup_key (key)
     }
 
   size = 32;
-  dst = (char *) malloc (size);
+  dst = (char *) xmalloc (size);
 
   res = RegQueryValueExA (reg_key, key, 0, &type, dst, &size);
   if (res == ERROR_MORE_DATA && type == REG_SZ)
     {
-      dst = (char *) realloc (dst, size);
+      dst = (char *) xrealloc (dst, size);
       res = RegQueryValueExA (reg_key, key, 0, &type, dst, &size);
     }