Just update debug msg 04/191104/1
authorhj kim <backto.kim@samsung.com>
Thu, 11 Oct 2018 09:22:34 +0000 (18:22 +0900)
committerhj kim <backto.kim@samsung.com>
Thu, 11 Oct 2018 09:22:34 +0000 (18:22 +0900)
Change-Id: I402360446e11ea90e265cc6c2e639b4b237562c9

src/image_util_encode.c

index 0724ee9a6eb5279a8493f6718b787cc32b7e9e9a..dfe2e4bedabf650546833cf842c0cca57676453a 100755 (executable)
@@ -255,10 +255,7 @@ int image_util_encode_set_input_buffer(image_util_encode_h handle, const unsigne
        int err = IMAGE_UTIL_ERROR_NONE;
        encode_s *_handle = (encode_s *) handle;
 
-       if (src_buffer == NULL) {
-               image_util_error("Invalid input buffer");
-               return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
-       }
+       image_util_retvm_if((src_buffer == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid input buffer");
 
        /* initialize buffer and value for source buffer */
        if (_handle->image_type == IMAGE_UTIL_GIF) {
@@ -456,11 +453,7 @@ static int _image_util_encode_create_thread(encode_s * handle)
 
        /*create threads */
        handle->thread = g_thread_new("encode_thread", (GThreadFunc) _image_util_encode_thread, (gpointer) handle);
-       if (!handle->thread) {
-               image_util_error("ERROR - create thread");
-
-               return IMAGE_UTIL_ERROR_INVALID_OPERATION;
-       }
+       image_util_retvm_if((handle->thread == NULL), IMAGE_UTIL_ERROR_INVALID_OPERATION, "ERROR - create thread");
 
        return IMAGE_UTIL_ERROR_NONE;
 }