aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-05-10 18:25:47 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-05-11 09:21:29 +0200
commitbbdc0269bf49aa8dd8259d0c31efff2366f6647f (patch)
tree516c2ef42233cb6b5c71a8100a4ae71f87cf6fd8 /utils/v4l2-ctl/v4l2-ctl-streaming.cpp
parentc39488120a52f88b730c406e2c6abf3176f5d06f (diff)
utils: replace chr functions with std variants
*chr in std offers const overloads, which avoid conversions. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/v4l2-ctl/v4l2-ctl-streaming.cpp')
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 0d5a1e1a..8578610d 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -1,7 +1,8 @@
+#include <cstring>
+
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
-#include <string.h>
#include <inttypes.h>
#include <getopt.h>
#include <sys/types.h>
@@ -1660,7 +1661,7 @@ static FILE *open_output_file(cv4l_fd &fd)
if (!host_to)
return NULL;
- char *p = strchr(host_to, ':');
+ char *p = std::strchr(host_to, ':');
struct sockaddr_in serv_addr;
struct hostent *server;
struct v4l2_fract aspect;
@@ -1925,7 +1926,7 @@ static FILE *open_input_file(cv4l_fd &fd, __u32 type)
if (!host_from)
return NULL;
- char *p = strchr(host_from, ':');
+ char *p = std::strchr(host_from, ':');
int listen_fd;
socklen_t clilen;
struct sockaddr_in serv_addr = {}, cli_addr;

Privacy Policy