From: Jaeyun Jung Date: Fri, 26 Jan 2024 07:15:16 +0000 (+0900) Subject: [C-Api] invalid casting of ml-option X-Git-Tag: accepted/tizen/unified/20240319.020733~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cdffa775c1a2d206f0e415ff4c7f80ba559624e;p=platform%2Fcore%2Fapi%2Fmachine-learning.git [C-Api] invalid casting of ml-option Fix invalid casting after allocating option handle. Signed-off-by: Jaeyun Jung --- diff --git a/c/src/ml-api-common.c b/c/src/ml-api-common.c index 0048328..06b9cf8 100644 --- a/c/src/ml-api-common.c +++ b/c/src/ml-api-common.c @@ -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; }