From cc0732ba28d55b2bbcfe80617415379de4f4cc6c Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Fri, 12 Jan 2007 00:39:10 +0000 Subject: * choose-temp.c (choose_temp_base): Check the result of the call to mktemp rather than testing the length of the modified string. --- libiberty/choose-temp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libiberty/choose-temp.c') 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; } -- cgit v1.1