diff options
author | Vincent Torri <vincent dot torri at gmail dot com> | 2016-02-01 12:17:01 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2016-02-01 12:34:48 +0100 |
commit | cedeb0c45517b1661e3bff22dae09a307e9ec6cb (patch) | |
tree | 8288c00e6983fe50d90110ef9d07b80481918c73 | |
parent | 2c61aa0d544fc0eeded0133df944540a6116a3e7 (diff) | |
download | efl-cedeb0c45517b1661e3bff22dae09a307e9ec6cb.tar.gz |
Eina_Value: do not mix declarations and code
Reviewers: cedric, jpeg
Reviewed By: jpeg
Differential Revision: https://phab.enlightenment.org/D3624
-rw-r--r-- | src/lib/eina/eina_inline_value.x | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/eina/eina_inline_value.x b/src/lib/eina/eina_inline_value.x index 3117f737a0..649e1de2a8 100644 --- a/src/lib/eina/eina_inline_value.x +++ b/src/lib/eina/eina_inline_value.x @@ -1679,10 +1679,12 @@ typedef struct _Eina_Value_Optional_Inner Eina_Value_Optional_Inner; static inline Eina_Bool eina_value_optional_empty_is(const Eina_Value *value, Eina_Bool *is_empty) { + void *mem; + EINA_VALUE_TYPE_OPTIONAL_CHECK_RETURN_VAL(value, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(is_empty, EINA_FALSE); - void *mem = eina_value_memory_get(value); + mem = eina_value_memory_get(value); if (!mem) return EINA_FALSE; if(2*sizeof(void*) <= sizeof(Eina_Value_Union)) @@ -1700,9 +1702,11 @@ eina_value_optional_empty_is(const Eina_Value *value, Eina_Bool *is_empty) static inline const Eina_Value_Type * eina_value_optional_type_get(Eina_Value *value) { + void *mem; + EINA_VALUE_TYPE_OPTIONAL_CHECK_RETURN_VAL(value, (const Eina_Value_Type *)NULL); - void *mem = eina_value_memory_get(value); + mem = eina_value_memory_get(value); if (!mem) return NULL; |