diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-05-10 18:25:47 -0700 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-05-11 09:21:29 +0200 |
commit | bbdc0269bf49aa8dd8259d0c31efff2366f6647f (patch) | |
tree | 516c2ef42233cb6b5c71a8100a4ae71f87cf6fd8 /utils/v4l2-ctl/v4l2-ctl-edid.cpp | |
parent | c39488120a52f88b730c406e2c6abf3176f5d06f (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-edid.cpp')
-rw-r--r-- | utils/v4l2-ctl/v4l2-ctl-edid.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-edid.cpp b/utils/v4l2-ctl/v4l2-ctl-edid.cpp index a2df6089..b13d8209 100644 --- a/utils/v4l2-ctl/v4l2-ctl-edid.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-edid.cpp @@ -1,7 +1,8 @@ +#include <cstring> + #include <unistd.h> #include <stdlib.h> #include <stdio.h> -#include <string.h> #include <inttypes.h> #include <fcntl.h> #include <ctype.h> @@ -710,7 +711,7 @@ static unsigned short parse_phys_addr(const char *value) { unsigned p1, p2, p3, p4; - if (!strchr(value, '.')) + if (!std::strchr(value, '.')) return strtoul(value, NULL, 0); if (sscanf(value, "%x.%x.%x.%x", &p1, &p2, &p3, &p4) != 4) { fprintf(stderr, "Expected a physical address of the form x.x.x.x\n"); |