mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Make BufFileWrite() void.
It now either returns after it wrote all the data you gave it, or raises an error. Not done in back-branches, because it might cause problems for external code. Discussion: https://postgr.es/m/CA%2BhUKGJE04G%3D8TLK0DLypT_27D9dR8F1RQgNp0jK6qR0tZGWOw%40mail.gmail.com
This commit is contained in:
		@@ -578,7 +578,7 @@ BufFileRead(BufFile *file, void *ptr, size_t size)
 | 
			
		||||
 * Like fwrite() except we assume 1-byte element size and report errors via
 | 
			
		||||
 * ereport().
 | 
			
		||||
 */
 | 
			
		||||
size_t
 | 
			
		||||
void
 | 
			
		||||
BufFileWrite(BufFile *file, void *ptr, size_t size)
 | 
			
		||||
{
 | 
			
		||||
	size_t		nwritten = 0;
 | 
			
		||||
@@ -617,8 +617,6 @@ BufFileWrite(BufFile *file, void *ptr, size_t size)
 | 
			
		||||
		size -= nthistime;
 | 
			
		||||
		nwritten += nthistime;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return nwritten;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user