summaryrefslogtreecommitdiff
path: root/libiberty/choose-temp.c
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2007-01-12 00:39:10 +0000
committerBen Elliston <bje@au.ibm.com>2007-01-12 00:39:10 +0000
commit6684019ac122faee0d768f83f4c6ed0cde9612da (patch)
tree6788b11e6065f7ab808d95461e1b31557244e240 /libiberty/choose-temp.c
parentf4e7523ba7d1dcb54aa2870fda71ea4d2ae82472 (diff)
downloadgdb-6684019ac122faee0d768f83f4c6ed0cde9612da.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.
Diffstat (limited to 'libiberty/choose-temp.c')
-rw-r--r--libiberty/choose-temp.c3
1 files changed, 1 insertions, 2 deletions
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;
}