raster pushed a commit to branch efl-1.20.

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

commit 73de6d7ac724d8d99bb12d0c66e8ac943ed6ddf4
Author: Chris Michael <[email protected]>
Date:   Mon Jan 22 11:26:13 2018 -0500

    ecore_drm2: fix seat matching when checking for a device with a null seat
    
    Summary: Check to make sure that the seat from the matching device is still 
null.
    
    Test Plan: Make sure that devices are not being rejected while on seat1. 
This depends on another patch
    
    Reviewers: ManMower, devilhorns
    
    Reviewed By: devilhorns
    
    Subscribers: ManMower, devilhorns, cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D5711
---
 src/lib/ecore_drm2/ecore_drm2_device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c 
b/src/lib/ecore_drm2/ecore_drm2_device.c
index 3545d1a299..e7d7afee5f 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -101,6 +101,8 @@ _drm2_device_find(Elput_Manager *em, const char *seat)
    Eina_Bool modeset;
    int fd;
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
+
    devs = eeze_udev_find_by_subsystem_sysname("drm", "card[0-9]*");
    if (!devs) return NULL;
 
@@ -114,9 +116,7 @@ _drm2_device_find(Elput_Manager *em, const char *seat)
         dseat = eeze_udev_syspath_get_property(dev, "ID_SEAT");
         if (!dseat) dseat = eina_stringshare_add("seat0");
 
-        if ((seat) && (strcmp(seat, dseat)))
-          goto cont;
-        else if (strcmp(dseat, "seat0"))
+        if (strcmp(seat, dseat))
           goto cont;
 
         fd = elput_manager_open(em, dpath, -1);

-- 


Reply via email to