diff options
author | Stefan Schmidt <stefan@osg.samsung.com> | 2015-11-13 14:05:25 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-11-13 14:05:25 +0100 |
commit | 6e7db171ad31f52a7ddb148e1e3eecc5730ea6a3 (patch) | |
tree | fd705feed8880d3e86f03f73fc831ebd633c76a4 /src/lib/emotion/emotion_webcam.c | |
parent | 038c4fed6c44e4a8fc9dd579dddb78bae462abc7 (diff) |
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.
Diffstat (limited to '')
-rw-r--r-- | src/lib/emotion/emotion_webcam.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/emotion/emotion_webcam.c b/src/lib/emotion/emotion_webcam.c index 5003030033..fe3c949a46 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) | |||
117 | if (ioctl(fd, VIDIOC_QUERYCAP, &caps) == -1) goto on_error; | 117 | if (ioctl(fd, VIDIOC_QUERYCAP, &caps) == -1) goto on_error; |
118 | 118 | ||
119 | /* Likely not a webcam */ | 119 | /* Likely not a webcam */ |
120 | if (!caps.capabilities & V4L2_CAP_VIDEO_CAPTURE) goto on_error; | 120 | if (!(caps.capabilities & V4L2_CAP_VIDEO_CAPTURE)) goto on_error; |
121 | if (caps.capabilities & V4L2_CAP_TUNER | 121 | if (caps.capabilities & V4L2_CAP_TUNER |
122 | || caps.capabilities & V4L2_CAP_RADIO | 122 | || caps.capabilities & V4L2_CAP_RADIO |
123 | || caps.capabilities & V4L2_CAP_MODULATOR) | 123 | || caps.capabilities & V4L2_CAP_MODULATOR) |