aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-09-11 14:30:29 (GMT)
committerHans Verkuil <hverkuil@xs4all.nl>2010-09-11 14:30:29 (GMT)
commita59c98e343b960ce1f2520cd2595073c5e695765 (patch)
treeb25f4697ba5581346ad700a3744433c2689a5b55
parent48261a4daf00ab1cde67f3c0b59ce47fbc11a6eb (diff)
Start iterating over menu items from the minimum value, not 0.
More a style issue than anything else. It is slightly more efficient if the minimum menu index is not 0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index 4af8fef..ab9a7d1 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -794,7 +794,7 @@ static void print_qctrl(int fd, struct v4l2_queryctrl *queryctrl,
}
printf("\n");
if (queryctrl->type == V4L2_CTRL_TYPE_MENU && show_menus) {
- for (i = 0; i <= queryctrl->maximum; i++) {
+ for (i = queryctrl->minimum; i <= queryctrl->maximum; i++) {
qmenu.index = i;
if (ioctl(fd, VIDIOC_QUERYMENU, &qmenu))
continue;

Privacy Policy