aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-ctl
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-20 11:46:48 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-04-21 10:53:53 +0200
commit08fc5f99998e324b8b851caa4f82d432e1463187 (patch)
treec5f7a68e248ef5c9e3789aa5798309a46df74b8a /utils/v4l2-ctl
parent42fd55af695f0393a2f059d6accc08f38c6dd1d4 (diff)
utils: use bool literals
Found with clang-tidy's modernize-use-bool-literals Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/v4l2-ctl')
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp2
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index de40c5ad..833263b6 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -2742,7 +2742,7 @@ static void streaming_set_cap2out(cv4l_fd &fd, cv4l_fd &out_fd)
if (use_poll)
fcntl(fd.g_fd(), F_SETFL, fd_flags | O_NONBLOCK);
- while (1) {
+ while (true) {
struct timeval tv = { use_poll ? 2 : 0, 0 };
int r = 0;
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index 42889ef8..c0097203 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -1145,7 +1145,7 @@ int main(int argc, char **argv)
short_options[idx++] = ':';
}
}
- while (1) {
+ while (true) {
int option_index = 0;
short_options[idx] = 0;
@@ -1531,7 +1531,7 @@ int main(int argc, char **argv)
__u32 seq = 0;
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
- while (1) {
+ while (true) {
int res;
FD_ZERO(&fds);
@@ -1572,7 +1572,7 @@ int main(int argc, char **argv)
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &epoll_ev);
- while (1) {
+ while (true) {
int res;
res = epoll_wait(epollfd, &epoll_ev, 1, -1);

Privacy Policy