From 2cdffa775c1a2d206f0e415ff4c7f80ba559624e Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Fri, 26 Jan 2024 16:15:16 +0900 Subject: [PATCH] [C-Api] invalid casting of ml-option Fix invalid casting after allocating option handle. Signed-off-by: Jaeyun Jung --- c/src/ml-api-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.7.4