diff options
author | Ben Elliston <bje@au.ibm.com> | 2007-01-12 00:39:10 +0000 |
---|---|---|
committer | Ben Elliston <bje@au.ibm.com> | 2007-01-12 00:39:10 +0000 |
commit | cc0732ba28d55b2bbcfe80617415379de4f4cc6c (patch) | |
tree | 0d4bd2f1a0e955aa8e0e8758d363b33d1ccb34e3 /libiberty/choose-temp.c | |
parent | 79baeb1eb29e350c46d244f07193c25f9ffd7475 (diff) | |
download | gdb-cc0732ba28d55b2bbcfe80617415379de4f4cc6c.zip gdb-cc0732ba28d55b2bbcfe80617415379de4f4cc6c.tar.gz gdb-cc0732ba28d55b2bbcfe80617415379de4f4cc6c.tar.bz2 |
* 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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c index 0cba990..4a26a82 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; } |