From e9e8368823fb382921fde457d85bba22ae305b9b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 9 Jun 2020 15:09:08 +0200 Subject: [PATCH] tests: eo: handle error return of eina_value_int_convert() CID: 1400962 Reviewed-by: Christopher Michael Differential Revision: https://phab.enlightenment.org/D11958 --- src/tests/eo/suite/eo_test_class_simple.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c index 846c2f2cb0..90449c6853 100644 --- a/src/tests/eo/suite/eo_test_class_simple.c +++ b/src/tests/eo/suite/eo_test_class_simple.c @@ -27,12 +27,19 @@ static Eina_Error _a_set_reflect(Eo *obj, Eina_Value value) { int a; + Eina_Error r = 0; - eina_value_int_convert(&value, &a); + if (!eina_value_int_convert(&value, &a)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } simple_a_set(obj, a); + +end: eina_value_flush(&value); - return 0; + return r; } static int