@@ -62,7 +62,7 @@ static void log_arg(const struct cec_arg *arg, const char *arg_name, __u32 val)
}
return;
case CEC_ARG_TYPE_U16:
- if (strstr(arg_name, "phys-addr"))
+ if (std::strstr(arg_name, "phys-addr"))
printf("\t%s: %x.%x.%x.%x\n", arg_name, cec_phys_addr_exp(val));
else
printf("\t%s: %u (0x%04x)\n", arg_name, val, val);
@@ -1190,13 +1190,13 @@ void common_get(cv4l_fd &_fd)
char *q;
buf[len] = 0;
- while ((q = strstr(p, "START STATUS"))) {
+ while ((q = std::strstr(p, "START STATUS"))) {
p = q + 1;
}
if (p) {
while (p > buf && *p != '<') p--;
q = p;
- while ((q = strstr(q, "<6>"))) {
+ while ((q = std::strstr(q, "<6>"))) {
memcpy(q, " ", 3);
}
printf("%s", p);
@@ -212,11 +212,11 @@ void misc_cmd(int ch, char *optarg)
jpegcomp.quality = strtol(value, 0L, 0);
break;
case 17:
- if (strstr(value, "dht"))
+ if (std::strstr(value, "dht"))
jpegcomp.jpeg_markers |= V4L2_JPEG_MARKER_DHT;
- if (strstr(value, "dqt"))
+ if (std::strstr(value, "dqt"))
jpegcomp.jpeg_markers |= V4L2_JPEG_MARKER_DQT;
- if (strstr(value, "dri"))
+ if (std::strstr(value, "dri"))
jpegcomp.jpeg_markers |= V4L2_JPEG_MARKER_DRI;
break;
case 18:
@@ -784,14 +784,14 @@ list_done:
char *q;
buf[len] = 0;
- while ((q = strstr(p, "START STATUS"))) {
+ while ((q = std::strstr(p, "START STATUS"))) {
found_status = true;
p = q + 1;
}
if (found_status) {
while (p > buf && *p != '<') p--;
q = p;
- while ((q = strstr(q, "<6>"))) {
+ while ((q = std::strstr(q, "<6>"))) {
memcpy(q, " ", 3);
}
printf("%s", p);
strstr has const overloads in std, avoiding pointless conversions. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- utils/libcecutil/cec-log.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-common.cpp | 4 ++-- utils/v4l2-ctl/v4l2-ctl-misc.cpp | 6 +++--- utils/v4l2-dbg/v4l2-dbg.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)