eldbus: production code inside Eina Safety Check assert.
authorGuilherme Lepsch <lepsch@expertisesolutions.com.br>
Thu, 5 Feb 2015 10:23:41 +0000 (11:23 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Thu, 5 Feb 2015 10:23:44 +0000 (11:23 +0100)
Summary: Eina Safety Checks assert macros don't do anything (no-op) if EINA_SAFETY_CHECKS is undefined.

@fix

Reviewers: felipealmeida, larryolj, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1926

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/eldbus/eldbus_message_from_eina_value.c

index c4ef74a..05bb9f5 100644 (file)
@@ -45,9 +45,8 @@ static Eina_Bool
 _array_append(const char *type, const Eina_Value *value_array, Eldbus_Message_Iter *iter)
 {
    Eldbus_Message_Iter *array;
-
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(
-            eldbus_message_iter_arguments_append(iter, type, &array), EINA_FALSE);
+   Eina_Bool ok = eldbus_message_iter_arguments_append(iter, type, &array);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ok, EINA_FALSE);
    DBG("array of type %c", type[1]);
    switch (type[1])
      {