]> granicus.if.org Git - postgresql/commitdiff
Remove excess argument to open(2).
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 2 Oct 2010 22:40:28 +0000 (18:40 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 2 Oct 2010 22:40:57 +0000 (18:40 -0400)
Many compilers don't complain about this, but some do, and it's certainly
wrong.  Back-patch to 8.4 where the error was introduced.

Mark Kirkwood

src/tools/fsync/test_fsync.c

index 744775bf7363feb0f8bbaeeb3668f976d269fdd1..68a78b8dd94e8dbe4a9110f241146ca1a2b057db 100644 (file)
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
        for (i = 0; i < XLOG_SEG_SIZE; i++)
                full_buf[i] = 'a';
 
-       if ((tmpfile = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR, 0)) == -1)
+       if ((tmpfile = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) == -1)
                die("Cannot open output file.");
        if (write(tmpfile, full_buf, XLOG_SEG_SIZE) != XLOG_SEG_SIZE)
                die("write failed");