xfstests: Don't use tempnam in growfiles.c
authorDave Chinner <david@fromorbit.com>
Wed, 20 Jan 2010 21:53:53 +0000 (08:53 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 20 Jan 2010 21:53:53 +0000 (08:53 +1100)
tempnam() generates a compiler warning as a dangerous function.
This code doesn't care about security issues with tempnam, so
remove it and just manually build the filenames without the
randomness of tempnam.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
ltp/growfiles.c

index a987b5a8aaa870c0226a4821076e84d332997e1b..52c90798a6f9987f6c7a9bd14671ca51516b0b8b 100644 (file)
@@ -1162,10 +1162,9 @@ no whole file checking will be performed!\n", Progname, TagName, (int)getpid());
        /*
         * construct auto filename and insert them into filenames space
         */
-               
        for(ind=0;ind<num_auto_files; ind++, num++) {
-               sprintf((char *)filenames+(num*PATH_MAX), "%s.%d",
-                       tempnam(auto_dir, auto_file), ind );
+               sprintf((char *)filenames+(num*PATH_MAX), "%s/%s.%d",
+                       auto_dir, auto_file, ind);
        }
 
        /*