summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2013-12-30 14:39:01 +0200
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-12-31 13:23:00 +0900
commitc37369f6a2f60ee97391664c7cd4757fa6859d10 (patch)
tree5d832555aa76e88ad5379ed06e4b9b3971ce1d7b /src
parentad10bebce083d9ac0226b4e4624284510e7c997d (diff)
datetime: add NULL checks
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_datetime.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/elm_datetime.c b/src/lib/elm_datetime.c
index ce79771bb..cc50fef5b 100644
--- a/src/lib/elm_datetime.c
+++ b/src/lib/elm_datetime.c
@@ -1067,12 +1067,12 @@ _value_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1067{ 1067{
1068 struct tm *currtime = va_arg(*list, struct tm *); 1068 struct tm *currtime = va_arg(*list, struct tm *);
1069 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1069 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1070 *ret = EINA_FALSE; 1070 if (ret) *ret = EINA_FALSE;
1071 EINA_SAFETY_ON_NULL_RETURN(currtime); 1071 EINA_SAFETY_ON_NULL_RETURN(currtime);
1072 Elm_Datetime_Smart_Data *sd = _pd; 1072 Elm_Datetime_Smart_Data *sd = _pd;
1073 1073
1074 *currtime = sd->curr_time; 1074 *currtime = sd->curr_time;
1075 *ret = EINA_TRUE; 1075 if (ret) *ret = EINA_TRUE;
1076} 1076}
1077 1077
1078EAPI Eina_Bool 1078EAPI Eina_Bool
@@ -1127,13 +1127,13 @@ _value_min_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1127{ 1127{
1128 struct tm *mintime = va_arg(*list, struct tm *); 1128 struct tm *mintime = va_arg(*list, struct tm *);
1129 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1129 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1130 *ret = EINA_FALSE; 1130 if (ret) *ret = EINA_FALSE;
1131 1131
1132 EINA_SAFETY_ON_NULL_RETURN(mintime); 1132 EINA_SAFETY_ON_NULL_RETURN(mintime);
1133 Elm_Datetime_Smart_Data *sd = _pd; 1133 Elm_Datetime_Smart_Data *sd = _pd;
1134 1134
1135 *mintime = sd->min_limit; 1135 *mintime = sd->min_limit;
1136 *ret = EINA_TRUE; 1136 if (ret) *ret = EINA_TRUE;
1137} 1137}
1138 1138
1139EAPI Eina_Bool 1139EAPI Eina_Bool
@@ -1188,13 +1188,13 @@ _value_max_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1188{ 1188{
1189 struct tm *maxtime = va_arg(*list, struct tm *); 1189 struct tm *maxtime = va_arg(*list, struct tm *);
1190 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1190 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1191 *ret = EINA_FALSE; 1191 if (ret) *ret = EINA_FALSE;
1192 1192
1193 EINA_SAFETY_ON_NULL_RETURN(maxtime); 1193 EINA_SAFETY_ON_NULL_RETURN(maxtime);
1194 Elm_Datetime_Smart_Data *sd = _pd; 1194 Elm_Datetime_Smart_Data *sd = _pd;
1195 1195
1196 *maxtime = sd->max_limit; 1196 *maxtime = sd->max_limit;
1197 *ret = EINA_TRUE; 1197 if (ret) *ret = EINA_TRUE;
1198} 1198}
1199 1199
1200EAPI Eina_Bool 1200EAPI Eina_Bool