summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-12 00:37:48 +0000
committerbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-12 00:37:48 +0000
commit4012b9abd1c659ae16a3db8a9d244409572ca278 (patch)
tree078dc81d387c0578595728620bc950f77a0b6497 /libiberty
parent02f8cd872b7126aaf6de8c08bce54e70adfd5d0a (diff)
downloadgcc-4012b9abd1c659ae16a3db8a9d244409572ca278.tar.gz
* choose-temp.c (choose_temp_base): Check the result of the call
to mktemp rather than testing the length of the modified string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120698 138bc75d-0d04-0410-961f-82ee72b054a4
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;
}