choose-temp.c (choose_temp_base): Check the result of the call to mktemp rather than...
authorBen Elliston <bje@au.ibm.com>
Fri, 12 Jan 2007 00:37:48 +0000 (00:37 +0000)
committerBen Elliston <bje@gcc.gnu.org>
Fri, 12 Jan 2007 00:37:48 +0000 (11:37 +1100)
* choose-temp.c (choose_temp_base): Check the result of the call
to mktemp rather than testing the length of the modified string.

From-SVN: r120698

libiberty/ChangeLog
libiberty/choose-temp.c

index e72f84520d1aef682c83b49acd289239f906c277..adffedafa48299cda80c7426e15b8263be472529 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-12  Ben Elliston  <bje@au.ibm.com>
+
+       * choose-temp.c (choose_temp_base): Check the result of call to
+       mktemp rather than testing the length of the modified string.
+
 2006-12-20  Geoffrey Keating  <geoffk@apple.com>
 
        * cp-demangle.h: Add comment explaining what to do to avoid
index 0cba9905d5bb9e41778d5fca5af45ecd532bfc64..4a26a827a2c296a21e2de69fc90b90ef485bf7f1 100644 (file)
@@ -65,8 +65,7 @@ choose_temp_base (void)
   strcpy (temp_filename, base);
   strcpy (temp_filename + len, TEMP_FILE);
 
-  mktemp (temp_filename);
-  if (strlen (temp_filename) == 0)
+  if (mktemp (temp_filename) == 0)
     abort ();
   return temp_filename;
 }