From 52f27744055ca7112e82ec95bfec7927a71fd69b Mon Sep 17 00:00:00 2001 From: Yoonchan Choi Date: Wed, 14 Aug 2013 14:32:58 +0900 Subject: [PATCH] Fix prevent defects Change-Id: I7894d5b16c01a33b3f353747608c25a34b0690ad Signed-off-by: Yoonchan Choi --- src/FScl_CalendarbookFilterImpl.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/FScl_CalendarbookFilterImpl.cpp b/src/FScl_CalendarbookFilterImpl.cpp index 316ffd4..659f0fc 100644 --- a/src/FScl_CalendarbookFilterImpl.cpp +++ b/src/FScl_CalendarbookFilterImpl.cpp @@ -356,7 +356,8 @@ _CalendarbookFilterImpl::AppendInt(FilterConjunctiveOperator conjunctiveOperator { calendar_filter_operator_e filterOperator = conjunctiveOperator == FI_CONJ_OP_AND ? CALENDAR_FILTER_OPERATOR_AND : CALENDAR_FILTER_OPERATOR_OR; - calendar_filter_add_operator(__filterHandle, filterOperator); + int ret = calendar_filter_add_operator(__filterHandle, filterOperator); + SysTryReturn(NID_SCL, ret == CALENDAR_ERROR_NONE, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG)); } int ret = calendar_filter_add_int(__filterHandle, id, match, convertedValue); @@ -386,7 +387,8 @@ _CalendarbookFilterImpl::AppendDouble(FilterConjunctiveOperator conjunctiveOpera { calendar_filter_operator_e filterOperator = conjunctiveOperator == FI_CONJ_OP_AND ? CALENDAR_FILTER_OPERATOR_AND : CALENDAR_FILTER_OPERATOR_OR; - calendar_filter_add_operator(__filterHandle, filterOperator); + int ret = calendar_filter_add_operator(__filterHandle, filterOperator); + SysTryReturn(NID_SCL, ret == CALENDAR_ERROR_NONE, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG)); } int ret = calendar_filter_add_double(__filterHandle, id, match, value); @@ -416,7 +418,8 @@ _CalendarbookFilterImpl::AppendBool(FilterConjunctiveOperator conjunctiveOperato { calendar_filter_operator_e filterOperator = conjunctiveOperator == FI_CONJ_OP_AND ? CALENDAR_FILTER_OPERATOR_AND : CALENDAR_FILTER_OPERATOR_OR; - calendar_filter_add_operator(__filterHandle, filterOperator); + int ret = calendar_filter_add_operator(__filterHandle, filterOperator); + SysTryReturn(NID_SCL, ret == CALENDAR_ERROR_NONE, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG)); } int ret = calendar_filter_add_int(__filterHandle, viewPropertyId, CALENDAR_MATCH_EQUAL, value); @@ -447,7 +450,8 @@ _CalendarbookFilterImpl::AppendDateTime(FilterConjunctiveOperator conjunctiveOpe { calendar_filter_operator_e filterOperator = conjunctiveOperator == FI_CONJ_OP_AND ? CALENDAR_FILTER_OPERATOR_AND : CALENDAR_FILTER_OPERATOR_OR; - calendar_filter_add_operator(__filterHandle, filterOperator); + int ret = calendar_filter_add_operator(__filterHandle, filterOperator); + SysTryReturn(NID_SCL, ret == CALENDAR_ERROR_NONE, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG)); } @@ -541,7 +545,8 @@ _CalendarbookFilterImpl::AppendString(FilterConjunctiveOperator conjunctiveOpera { calendar_filter_operator_e filterOperator = conjunctiveOperator == FI_CONJ_OP_AND ? CALENDAR_FILTER_OPERATOR_AND : CALENDAR_FILTER_OPERATOR_OR; - calendar_filter_add_operator(__filterHandle, filterOperator); + int ret = calendar_filter_add_operator(__filterHandle, filterOperator); + SysTryReturn(NID_SCL, ret == CALENDAR_ERROR_NONE, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG)); } int ret = calendar_filter_add_str(__filterHandle, viewPropertyId, match, pCharArray.get()); @@ -567,7 +572,9 @@ _CalendarbookFilterImpl::AppendFilter(FilterConjunctiveOperator conjunctiveOpera if (!__isEmpty) { calendar_filter_operator_e filterOperator = conjunctiveOperator == FI_CONJ_OP_AND ? CALENDAR_FILTER_OPERATOR_AND : CALENDAR_FILTER_OPERATOR_OR; - calendar_filter_add_operator(__filterHandle, filterOperator); + + int ret = calendar_filter_add_operator(__filterHandle, filterOperator); + SysTryReturn(NID_SCL, ret == CALENDAR_ERROR_NONE, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG)); } int ret = calendar_filter_add_filter(__filterHandle, filter.__filterHandle); -- 2.7.4