hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=574e73598ef512b50d88ac0985ee3091264095b5

commit 574e73598ef512b50d88ac0985ee3091264095b5
Author: Hermet Park <[email protected]>
Date:   Thu Nov 15 12:15:58 2018 +0900

    ector: fix wrong initalization count reference.
    
    Ector shutdown couldn't terminate engine properly
    since it's counting statement is wrong.
---
 src/lib/ector/software/ector_software_surface.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/ector/software/ector_software_surface.c 
b/src/lib/ector/software/ector_software_surface.c
index 2907272f40..10cf9962fd 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -21,7 +21,7 @@ struct _Ector_Software_Task
    void *data;
 };
 
-static int count_init = 0;
+static int _count_init = 0;
 static unsigned int current = 0;
 static unsigned int cpu_core = 0;
 static Ector_Software_Thread *ths = NULL;
@@ -69,7 +69,8 @@ _ector_software_init(void)
 {
    int cpu, i;
 
-   if (count_init++) return ;
+   ++_count_init;
+   if (_count_init != 1) return;
 
    cpu = eina_cpu_count() - 1;
    if (cpu < 1)
@@ -106,7 +107,8 @@ _ector_software_shutdown(void)
    Ector_Software_Thread *t;
    unsigned int i;
 
-   if (!--count_init) return ;
+   --_count_init;
+   if (_count_init != 0) return;
 
    if (!ths)
      {

-- 


Reply via email to