postgres.git / summary / log / commit / refs

commit    e77f605d431c488983d6c96cb3513c691bf1907c
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Sat Oct 02 22:40:28 2010 +0000
First released in: 9.1.0, 8.4.6, 9.0.2

    Remove excess argument to open(2).
    
    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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/fsync/test_fsync.c b/src/tools/fsync/test_fsync.c index 3c9c6b60ced..28c211929ec 100644 --- a/src/tools/fsync/test_fsync.c +++ b/src/tools/fsync/test_fsync.c @@ -63,7 +63,7 @@ main(int argc, char *argv[]) for (i = 0; i < XLOG_SEG_SIZE; i++) full_buf[i] = random(); - 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"); [parent: 1f0b62e8c280]