]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added missing mode_t argument to open() system call.
authorBart Van Assche <bvanassche@acm.org>
Mon, 23 Jun 2008 18:57:48 +0000 (18:57 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 23 Jun 2008 18:57:48 +0000 (18:57 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8274

memcheck/tests/file_locking.c
memcheck/tests/file_locking.stderr.exp

index fe5bff489eaab7b7074db5afacb854cbb64d3598..9d833377bd8b255ae2291d17de742b8e3ca115a9 100644 (file)
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
 
   unlink(filename);
 
-  if ((fd1 = open(filename, O_RDWR | O_CREAT)) >= 0)
+  if ((fd1 = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) >= 0)
   {
     fprintf(stderr, "About to lock file for writing.\n");
     if (lock_file(fd1))
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
         }
         else
         {
-          fprintf(stderr, "ERROR: second lock attempt succeeded !\n");
+          fprintf(stderr, "Second locking attempt succeeded.\n");
         }
         close(fd2);
       }
index e12d4346a81418bbdb26ebe14f937773f7faf4c5..df5bcfa923774a770e3a32e7f20cebedf54871d1 100644 (file)
@@ -1,4 +1,4 @@
 About to lock file for writing.
 First locking attempt succeeded.
-second open call: Permission denied
+Second locking attempt succeeded.
 Test finished successfully.