Eina promise: Simplify code and remove shadow variable.
authorTom Hacohen <tom@stosb.com>
Sun, 5 Jun 2016 09:39:13 +0000 (10:39 +0100)
committerTom Hacohen <tom@stosb.com>
Sun, 5 Jun 2016 09:57:07 +0000 (10:57 +0100)
There was no need for the extra variable. This also fixes a shadow
warning.

src/lib/eina/eina_promise.c

index e6e3a14..0b6a180 100644 (file)
@@ -280,8 +280,7 @@ _eina_promise_pointer_value_get(_Eina_Promise_Default const* p)
    if (p->has_finished && !p->has_errored)
      {
         char const* buffer = promise->value;
-        void** p = (void**)buffer;
-        return *p;
+        return (void**)buffer;
      }
    else
      {