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
This commit is contained in:
Cedric Bail 2019-10-16 16:45:50 -07:00 committed by Marcel Hollerbach
parent 514a96f4d6
commit 2f1894d054
1 changed files with 1 additions and 1 deletions

View File

@ -5664,7 +5664,7 @@ eina_value_copy(const Eina_Value *value, Eina_Value *copy)
EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
if (!memcmp(value, &_eina_value_empty, sizeof (Eina_Value)))
if (value->type == NULL)
{
memcpy(copy, &_eina_value_empty, sizeof (Eina_Value));
return EINA_TRUE;