discomfitor pushed a commit to branch master.

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

commit fbf8ee656c4733d283527597cb9b7270fe503807
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Thu Feb 18 13:34:23 2016 -0600

    ecore_drm: Check list presence by NULL test instead of counting
    
    a count of < 1 will just be a NULL pointer, and a count of > 0 will
    be non NULL, so we can simplify these conditionals.
---
 src/lib/ecore_drm/ecore_drm_output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_drm/ecore_drm_output.c 
b/src/lib/ecore_drm/ecore_drm_output.c
index 9322ab9..79df7ef 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -792,7 +792,7 @@ _ecore_drm_outputs_update(Ecore_Drm_Device *dev)
 
         if (!(dev->conn_allocator & (1 << conn_id)))
           {
-             if (eina_list_count(dev->outputs) > 0)
+             if (dev->outputs)
                {
                   Ecore_Drm_Output *last;
 
@@ -958,7 +958,7 @@ next:
      }
 
    ret = EINA_TRUE;
-   if (eina_list_count(dev->outputs) < 1) 
+   if (!dev->outputs)
      ret = EINA_FALSE;
 
    /* free resources */

-- 


Reply via email to