|
From: <sv...@va...> - 2014-08-09 11:27:01
|
Author: philippe
Date: Sat Aug 9 11:26:51 2014
New Revision: 14247
Log:
Mark argument of VG_(mkstemp) as const.
Fix comment in pub_core_libcfile.h (and make it the only copy)
Modified:
trunk/coregrind/m_libcfile.c
trunk/coregrind/pub_core_libcfile.h
Modified: trunk/coregrind/m_libcfile.c
==============================================================================
--- trunk/coregrind/m_libcfile.c (original)
+++ trunk/coregrind/m_libcfile.c Sat Aug 9 11:26:51 2014
@@ -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;
Modified: trunk/coregrind/pub_core_libcfile.h
==============================================================================
--- trunk/coregrind/pub_core_libcfile.h (original)
+++ trunk/coregrind/pub_core_libcfile.h Sat Aug 9 11:26:51 2014
@@ -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
|