summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2019-10-16 16:45:50 -0700
committerMike Blumenkrantz <zmike@samsung.com>2019-11-26 11:42:44 -0500
commit5716de7ec3810563341e747357afafefb7bbbd88 (patch)
tree120b7de0c2249e98d87fa1d952aa55fee5628c7c
parentca02993b76bff3b17ada169195bb606b7b2bc7b8 (diff)
eina: only the type need to be NULL to assume EINA_VALUE_EMPTY.
This avoid comparison with potentially uninitialized byte. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10479
-rw-r--r--src/lib/eina/eina_value.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index 63f45b9bbe..0596b70e9f 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -5664,7 +5664,7 @@ eina_value_copy(const Eina_Value *value, Eina_Value *copy)
5664 5664
5665 EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE); 5665 EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
5666 5666
5667 if (!memcmp(value, &_eina_value_empty, sizeof (Eina_Value))) 5667 if (value->type == NULL)
5668 { 5668 {
5669 memcpy(copy, &_eina_value_empty, sizeof (Eina_Value)); 5669 memcpy(copy, &_eina_value_empty, sizeof (Eina_Value));
5670 return EINA_TRUE; 5670 return EINA_TRUE;