From: bje Date: Fri, 12 Jan 2007 00:37:48 +0000 (+0000) Subject: * choose-temp.c (choose_temp_base): Check the result of the call X-Git-Tag: upstream/4.9.2~51120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4012b9abd1c659ae16a3db8a9d244409572ca278;p=platform%2Fupstream%2Flinaro-gcc.git * 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 --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index e72f845..adffeda 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2007-01-12 Ben Elliston + + * 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 * cp-demangle.h: Add comment explaining what to do to avoid 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; }