]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Use mkstemp_format in VG_(mkstemp). That way nothing breaks should
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 9 Aug 2014 21:45:56 +0000 (21:45 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 9 Aug 2014 21:45:56 +0000 (21:45 +0000)
the format change.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14252

coregrind/m_libcfile.c

index d42128e1a06f2828735b22bb80359d7a6924ae99..ccac5bb5311bb6e0706958aa0d20116fc4cb7d5f 100644 (file)
@@ -709,7 +709,7 @@ const HChar *VG_(tmpdir)(void)
    return tmpdir;
 }
 
-static const HChar *mkstemp_format = "%s/valgrind_%s_%08x";
+static const HChar mkstemp_format[] = "%s/valgrind_%s_%08x";
 
 SizeT VG_(mkstemp_fullname_bufsz) ( SizeT part_of_name_len )
 {
@@ -742,7 +742,7 @@ Int VG_(mkstemp) ( const HChar* part_of_name, /*OUT*/HChar* fullname )
    while (True) {
       if (tries++ > 10) 
          return -1;
-      VG_(sprintf)( buf, "%s/valgrind_%s_%08x",
+      VG_(sprintf)( buf, mkstemp_format,
                     tmpdir, part_of_name, VG_(random)( &seed ));
       if (0)
          VG_(printf)("VG_(mkstemp): trying: %s\n", buf);