summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2007-01-12 00:37:48 +0000
committerBen Elliston <bje@gcc.gnu.org>2007-01-12 11:37:48 +1100
commit7d37bf39d0c618b44e4d48746d40a0eecb3fbfc0 (patch)
tree078dc81d387c0578595728620bc950f77a0b6497 /libiberty
parentb697aed40f6fd83d37a81bdaece4369b434b9555 (diff)
downloadgcc-7d37bf39d0c618b44e4d48746d40a0eecb3fbfc0.tar.gz
choose-temp.c (choose_temp_base): Check the result of the call to mktemp rather than testing the length of the...
* 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
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/choose-temp.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index e72f84520d1..adffedafa48 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -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
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c
index 0cba9905d5b..4a26a827a2c 100644
--- a/libiberty/choose-temp.c
+++ b/libiberty/choose-temp.c
@@ -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;
}