]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix wrappers for sys_futimesat and sys_utimensat. (Dan Kegel)
authorJulian Seward <jseward@acm.org>
Mon, 12 May 2008 14:29:23 +0000 (14:29 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 12 May 2008 14:29:23 +0000 (14:29 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8047

coregrind/m_syswrap/syswrap-linux.c

index f885669330b245ddee319828a83b2913e90ba419..976c8e47a499337aa21acebd05e88a58dbc67e4d 100644 (file)
@@ -2716,7 +2716,8 @@ PRE(sys_futimesat)
    PRINT("sys_futimesat ( %d, %p(%s), %p )", ARG1,ARG2,ARG2,ARG3);
    PRE_REG_READ3(long, "futimesat",
                  int, dfd, char *, filename, struct timeval *, tvp);
-   PRE_MEM_RASCIIZ( "futimesat(filename)", ARG2 );
+   if (ARG2 != 0)
+      PRE_MEM_RASCIIZ( "futimesat(filename)", ARG2 );
    if (ARG3 != 0)
       PRE_MEM_READ( "futimesat(tvp)", ARG3, 2 * sizeof(struct vki_timeval) );
 }
@@ -2726,7 +2727,8 @@ PRE(sys_utimensat)
    PRINT("sys_utimensat ( %d, %p(%s), %p, 0x%x )", ARG1,ARG2,ARG2,ARG3,ARG4);
    PRE_REG_READ4(long, "utimensat",
                  int, dfd, char *, filename, struct timespec *, utimes, int, flags);
-   PRE_MEM_RASCIIZ( "utimensat(filename)", ARG2 );
+   if (ARG2 != 0)
+      PRE_MEM_RASCIIZ( "utimensat(filename)", ARG2 );
    if (ARG3 != 0)
       PRE_MEM_READ( "utimensat(tvp)", ARG3, 2 * sizeof(struct vki_timespec) );
 }