mirror of
				https://git.tukaani.org/xz.git
				synced 2025-10-31 21:43:04 +00:00 
			
		
		
		
	liblzma: Improve lzma encoder init function consistency.
lzma_encoder_init() did not check for NULL options, but lzma2_encoder_init() did. This is more of a code style improvement than anything else to help make lzma_encoder_init() and lzma2_encoder_init() more similar. (cherry picked from commit 019afd72e02339a6bf00c32bfb56f649c637dd6b)
This commit is contained in:
		
							parent
							
								
									fa91e29dba
								
							
						
					
					
						commit
						94c8503486
					
				| @ -620,6 +620,9 @@ static lzma_ret | |||||||
| lzma_encoder_init(lzma_lz_encoder *lz, const lzma_allocator *allocator, | lzma_encoder_init(lzma_lz_encoder *lz, const lzma_allocator *allocator, | ||||||
| 		const void *options, lzma_lz_options *lz_options) | 		const void *options, lzma_lz_options *lz_options) | ||||||
| { | { | ||||||
|  |         if (options == NULL) | ||||||
|  |                 return LZMA_PROG_ERROR; | ||||||
|  | 
 | ||||||
| 	lz->code = &lzma_encode; | 	lz->code = &lzma_encode; | ||||||
| 	return lzma_lzma_encoder_create( | 	return lzma_lzma_encoder_create( | ||||||
| 			&lz->coder, allocator, options, lz_options); | 			&lz->coder, allocator, options, lz_options); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user