stefan pushed a commit to branch master.

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

commit 6e7db171ad31f52a7ddb148e1e3eecc5730ea6a3
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Fri Nov 13 14:05:25 2015 +0100

    emotion webcam: fix check for v4l2 video capture device capability
    
    The negation should be uses after checking the capability bit with the &.
    Better use parenthesis  to make this work.
    
    Thankls to the sparse sematic parser for spotting this.
---
 src/lib/emotion/emotion_webcam.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/emotion/emotion_webcam.c b/src/lib/emotion/emotion_webcam.c
index 5003030..fe3c949 100644
--- a/src/lib/emotion/emotion_webcam.c
+++ b/src/lib/emotion/emotion_webcam.c
@@ -117,7 +117,7 @@ _emotion_check_device(Emotion_Webcam *ew)
    if (ioctl(fd, VIDIOC_QUERYCAP, &caps) == -1) goto on_error;
 
    /* Likely not a webcam */
-   if (!caps.capabilities & V4L2_CAP_VIDEO_CAPTURE) goto on_error;
+   if (!(caps.capabilities & V4L2_CAP_VIDEO_CAPTURE)) goto on_error;
    if (caps.capabilities & V4L2_CAP_TUNER
        || caps.capabilities & V4L2_CAP_RADIO
        || caps.capabilities & V4L2_CAP_MODULATOR)

-- 


Reply via email to