summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-09-12 10:22:21 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-09-12 10:22:21 -0700
commit2e4d357a26950864f6edf03c3b664fcad8b0d036 (patch)
tree3140e393fbfd10ef517ac728b37475103dbc9cf4 /src/lib/eio
parent19e0f35d1c3fc088291ffad590598c599cdc1409 (diff)
eio: simplify promise use.
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/efl_io_manager.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index dc7b243ecf..e4100810af 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -438,11 +438,8 @@ static void
438_future_file_done_cb(void *data, Eio_File *handler) 438_future_file_done_cb(void *data, Eio_File *handler)
439{ 439{
440 Eina_Promise *p = data; 440 Eina_Promise *p = data;
441 Eina_Value v = EINA_VALUE_EMPTY;
442 441
443 eina_value_setup(&v, EINA_VALUE_TYPE_UINT64); 442 eina_promise_resolve(p, eina_value_uint64_init(handler->length));
444 eina_value_set(&v, handler->length);
445 eina_promise_resolve(p, v);
446} 443}
447 444
448static void 445static void
@@ -451,11 +448,8 @@ _future_file_error_cb(void *data,
451 int error) 448 int error)
452{ 449{
453 Eina_Promise *p = data; 450 Eina_Promise *p = data;
454 Eina_Value v = EINA_VALUE_EMPTY;
455 451
456 eina_value_setup(&v, EINA_VALUE_TYPE_ERROR); 452 eina_promise_reject(p, error);
457 eina_value_set(&v, error);
458 eina_promise_resolve(p, v);
459} 453}
460 454
461static void 455static void