]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Mark argument of VG_(mkstemp) as const.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 9 Aug 2014 11:26:51 +0000 (11:26 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 9 Aug 2014 11:26:51 +0000 (11:26 +0000)
Fix comment in pub_core_libcfile.h (and make it the only copy)

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

coregrind/m_libcfile.c
coregrind/pub_core_libcfile.h

index 9ff6b6100454128def3108363b5ac67c60b3e42d..d42128e1a06f2828735b22bb80359d7a6924ae99 100644 (file)
@@ -721,12 +721,7 @@ SizeT VG_(mkstemp_fullname_bufsz) ( SizeT part_of_name_len )
 }
 
 
-/* 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;
index f27725b85ae85c4b6c4d930888cddde1c27cbf48..d3bd68069adbbac6eb4284dbed2d04e3216721f7 100644 (file)
@@ -95,9 +95,9 @@ extern SizeT VG_(mkstemp_fullname_bufsz) ( SizeT part_of_name_len );
 
 /* 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