mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 18:35:41 +01:00 
			
		
		
		
	muxedit: remove a few redundant NULL checks
Change-Id: I8285a7694d40b0f5c986dbfe40703251682eaafc
This commit is contained in:
		| @@ -29,7 +29,8 @@ static void MuxInit(WebPMux* const mux) { | ||||
| WebPMux* WebPNewInternal(int version) { | ||||
|   WebPMux* const mux = (version == WEBP_MUX_ABI_VERSION) ? | ||||
|                        (WebPMux*)malloc(sizeof(WebPMux)) : NULL; | ||||
|   if (mux) MuxInit(mux); | ||||
|   // If mux is NULL MuxInit is a noop. | ||||
|   MuxInit(mux); | ||||
|   return mux; | ||||
| } | ||||
|  | ||||
| @@ -75,7 +76,7 @@ static WebPMuxError MuxSet(WebPMux* const mux, TAG_ID id, uint32_t nth, | ||||
|                            WebPImageInfo* image_info, int copy_data) { | ||||
|   WebPChunk chunk; | ||||
|   WebPMuxError err = WEBP_MUX_NOT_FOUND; | ||||
|   if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT; | ||||
|   assert(mux != NULL); | ||||
|   assert(!IsWPI(id)); | ||||
|  | ||||
|   ChunkInit(&chunk); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user