[C-Api] invalid casting of ml-option
authorJaeyun Jung <jy1210.jung@samsung.com>
Fri, 26 Jan 2024 07:15:16 +0000 (16:15 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 30 Jan 2024 05:22:53 +0000 (14:22 +0900)
Fix invalid casting after allocating option handle.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
c/src/ml-api-common.c

index 0048328..06b9cf8 100644 (file)
@@ -1395,7 +1395,7 @@ ml_option_create (ml_option_h * option)
     _ml_error_report_return (ML_ERROR_OUT_OF_MEMORY,
         "Failed to allocate memory for the option handle. Out of memory?");
 
-  *option = (ml_option_h *) _option;
+  *option = _option;
   return ML_ERROR_NONE;
 }
 
@@ -1509,7 +1509,7 @@ _ml_information_create (ml_information_h * info)
     _ml_error_report_return (ML_ERROR_OUT_OF_MEMORY,
         "Failed to allocate memory for the info handle. Out of memory?");
 
-  *info = (ml_information_h *) _info;
+  *info = _info;
   return ML_ERROR_NONE;
 }