From: jiyong.min Date: Mon, 7 Sep 2020 01:21:39 +0000 (+0900) Subject: Fix incorrect return for invalid parameter X-Git-Tag: accepted/tizen/unified/20200908.003017~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3611cb7e15c7856c118b1d06d80ed5f130f9c2a;p=platform%2Fcore%2Fmultimedia%2Flibmm-utility.git Fix incorrect return for invalid parameter Change-Id: I7649e1dbe6ab51145be3372599ad1e86d8752955 --- diff --git a/gif/mm_util_gif.c b/gif/mm_util_gif.c index 9807d9c..3a172cf 100644 --- a/gif/mm_util_gif.c +++ b/gif/mm_util_gif.c @@ -738,8 +738,8 @@ int mm_util_gif_encode_save_to_file(mm_gif_file_h gif_file_h, const char *path) mm_util_retvm_if(!gif_file_h, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid gif_file_h"); mm_util_retvm_if(!MMUTIL_STRING_VALID(path), MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid path"); - mm_util_retvm_if(!gif_file->GifFile, MM_UTIL_ERROR_INVALID_OPERATION, "Encoding has not started"); - mm_util_retvm_if(gif_file->GifFile->ImageCount <= 0, MM_UTIL_ERROR_INVALID_OPERATION, "No frame has encoded"); + mm_util_retvm_if(!gif_file->GifFile, MM_UTIL_ERROR_INVALID_PARAMETER, "Encoding has not started"); + mm_util_retvm_if(gif_file->GifFile->ImageCount <= 0, MM_UTIL_ERROR_INVALID_PARAMETER, "No frame has encoded"); mm_util_fenter(); @@ -763,8 +763,8 @@ int mm_util_gif_encode_save_to_buffer(mm_gif_file_h gif_file_h, void **buffer, s mm_util_retvm_if(!gif_file_h, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid gif_file_h"); mm_util_retvm_if(!buffer || !buffer_size, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid buffer"); - mm_util_retvm_if(!gif_file->GifFile, MM_UTIL_ERROR_INVALID_OPERATION, "Encoding has not started"); - mm_util_retvm_if(gif_file->GifFile->ImageCount <= 0, MM_UTIL_ERROR_INVALID_OPERATION, "No frame has encoded"); + mm_util_retvm_if(!gif_file->GifFile, MM_UTIL_ERROR_INVALID_PARAMETER, "Encoding has not started"); + mm_util_retvm_if(gif_file->GifFile->ImageCount <= 0, MM_UTIL_ERROR_INVALID_PARAMETER, "No frame has encoded"); mm_util_fenter();