mirror of
				https://git.code.sf.net/p/libpng/code.git
				synced 2025-07-10 18:04:09 +02:00 
			
		
		
		
	[libpng17] Refactor conditional compilation of png_get_compression_buffer_size()
for readability
This commit is contained in:
		
							parent
							
								
									daf4b9dd18
								
							
						
					
					
						commit
						a3458a6ba0
					
				
							
								
								
									
										9
									
								
								pngget.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								pngget.c
									
									
									
									
									
								
							@ -1152,7 +1152,6 @@ png_get_compression_buffer_size(png_const_structrp png_ptr)
 | 
			
		||||
 | 
			
		||||
#ifdef PNG_WRITE_SUPPORTED
 | 
			
		||||
   if (png_ptr->read_struct)
 | 
			
		||||
#endif
 | 
			
		||||
   {
 | 
			
		||||
# ifdef PNG_SEQUENTIAL_READ_SUPPORTED
 | 
			
		||||
      return png_ptr->IDAT_read_size;
 | 
			
		||||
@ -1161,10 +1160,16 @@ png_get_compression_buffer_size(png_const_structrp png_ptr)
 | 
			
		||||
# endif
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
#ifdef PNG_WRITE_SUPPORTED
 | 
			
		||||
   else
 | 
			
		||||
      return png_ptr->zbuffer_size;
 | 
			
		||||
 | 
			
		||||
#else /* !WRITE */
 | 
			
		||||
# ifdef PNG_SEQUENTIAL_READ_SUPPORTED
 | 
			
		||||
   return png_ptr->IDAT_read_size;
 | 
			
		||||
# else
 | 
			
		||||
   return PNG_IDAT_READ_SIZE;
 | 
			
		||||
# endif
 | 
			
		||||
#endif /* WRITE */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user