diff mbox

[v6,52/52] llvm: fix creation of sparsec's tmp files

Message ID 20170327212416.18536-53-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Luc Van Oostenryck March 27, 2017, 9:24 p.m. UTC
It seems the intention was to create the tmp files with
the suffixes but the files are create without the suffixes
(while the filename that is used later is with the suffixes).

In all case the non-suffixed file that is created by the
mktemp command is never removed and after a while these
files begin to pile-up. Better to remove them.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 sparsec | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/sparsec b/sparsec
index 9dc96c956..e421776e2 100755
--- a/sparsec
+++ b/sparsec
@@ -29,8 +29,8 @@  while [ $# -gt 0 ]; do
 	shift
 done
 
-TMPLLVM=`mktemp -t tmp.XXXXXX`".llvm"
-TMPFILE=`mktemp -t tmp.XXXXXX`".o"
+TMPLLVM=`mktemp -t tmp.XXXXXX.llvm`
+TMPFILE=`mktemp -t tmp.XXXXXX.o`
 
 $DIRNAME/sparse-llvm $SPARSEOPTS > $TMPLLVM