summaryrefslogtreecommitdiff
path: root/src/v4l2
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2')
-rw-r--r--src/v4l2/v4l2_camera_proxy.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index 62252047..b620f236 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -85,7 +85,8 @@ void *V4L2CameraProxy::mmap(void *addr, size_t length, int prot, int flags,
}
unsigned int index = offset / sizeimage_;
- if (index * sizeimage_ != offset || length != sizeimage_) {
+ if (static_cast<off_t>(index * sizeimage_) != offset ||
+ length != sizeimage_) {
errno = EINVAL;
return MAP_FAILED;
}