Mark argument of VG_(mkstemp) as const.
Fix comment in pub_core_libcfile.h (and make it the only copy)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14247 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c
index 9ff6b61..d42128e 100644
--- a/coregrind/m_libcfile.c
+++ b/coregrind/m_libcfile.c
@@ -721,12 +721,7 @@
}
-/* Create and open (-rw------) a tmp file name incorporating said arg.
- Returns -1 on failure, else the fd of the file. If fullname is
- non-NULL, the file's name is written into it. The number of bytes
- written is equal to VG_(mkstemp_fullname_bufsz)(part_of_name). */
-
-Int VG_(mkstemp) ( HChar* part_of_name, /*OUT*/HChar* fullname )
+Int VG_(mkstemp) ( const HChar* part_of_name, /*OUT*/HChar* fullname )
{
HChar buf[VG_(mkstemp_fullname_bufsz)(VG_(strlen)(part_of_name))];
Int n, tries, fd;
diff --git a/coregrind/pub_core_libcfile.h b/coregrind/pub_core_libcfile.h
index f27725b..d3bd680 100644
--- a/coregrind/pub_core_libcfile.h
+++ b/coregrind/pub_core_libcfile.h
@@ -95,9 +95,9 @@
/* Create and open (-rw------) a tmp file name incorporating said arg.
Returns -1 on failure, else the fd of the file. If fullname is
- non-NULL, the file's name is written into it. The number of bytes
- written is equal to VG_(mkstemp_fullname_bufsz)(part_of_name). */
-extern Int VG_(mkstemp) ( HChar* part_of_name, /*OUT*/HChar* fullname );
+ non-NULL, the file's name is written into it. The number of bytes written
+ is equal to VG_(mkstemp_fullname_bufsz)(VG_(strlen)(part_of_name)). */
+extern Int VG_(mkstemp) ( const HChar* part_of_name, /*OUT*/HChar* fullname );
/* Record the process' working directory at startup. Is intended to
be called exactly once, at startup, before the working directory