aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-09-19 19:49:58 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-10-03 12:47:47 +0200
commit8155a05c650b1d24e8ee025640a8400119c91eda (patch)
treea4fead6bde9202b162651fec9b57676673ed41e7
parenteaf47d3d5446545eac9b4c62025a19e7cef717ae (diff)
cppcheck: use const references
Found with constVariable Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/common/media-info.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp
index 5e40bafc..2d7caf3d 100644
--- a/utils/common/media-info.cpp
+++ b/utils/common/media-info.cpp
@@ -439,7 +439,7 @@ static __u32 read_topology(int media_fd, __u32 major, __u32 minor,
*is_invalid = true;
return MEDIA_ENT_F_UNKNOWN;
}
- media_v2_interface &iface = v2_ifaces[i];
+ const media_v2_interface &iface = v2_ifaces[i];
for (i = 0; i < topology.num_links; i++) {
__u32 type = v2_links[i].flags & MEDIA_LNK_FL_LINK_TYPE;
@@ -486,7 +486,7 @@ static __u32 read_topology(int media_fd, __u32 major, __u32 minor,
if (is_radio)
return MEDIA_ENT_F_UNKNOWN;
- media_v2_entity &ent = v2_ents[i];
+ const media_v2_entity &ent = v2_ents[i];
printf("Entity Info:\n");
printf("\tID : 0x%08x (%u)\n", ent.id, ent.id);
printf("\tName : %s\n", ent.name);

Privacy Policy