mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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
This commit is contained in:
		@@ -63,7 +63,7 @@ main(int argc, char *argv[])
 | 
				
			|||||||
	for (i = 0; i < XLOG_SEG_SIZE; i++)
 | 
						for (i = 0; i < XLOG_SEG_SIZE; i++)
 | 
				
			||||||
		full_buf[i] = random();
 | 
							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.");
 | 
							die("Cannot open output file.");
 | 
				
			||||||
	if (write(tmpfile, full_buf, XLOG_SEG_SIZE) != XLOG_SEG_SIZE)
 | 
						if (write(tmpfile, full_buf, XLOG_SEG_SIZE) != XLOG_SEG_SIZE)
 | 
				
			||||||
		die("write failed");
 | 
							die("write failed");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user