diff mbox series

[v2,1/2] v4l2-utils: Change get_(cap_compose|out_crop)_rect() return type to void

Message ID 20220503143812.982985-1-xavier.roumegue@oss.nxp.com
State New
Headers show
Series [v2,1/2] v4l2-utils: Change get_(cap_compose|out_crop)_rect() return type to void | expand

Commit Message

Xavier Roumegue (OSS) May 3, 2022, 2:38 p.m. UTC
Those functions always return 0, hence change their prototype to void.

Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
---
 utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 7f6482d6..8a06c754 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -394,7 +394,7 @@  static enum codec_type get_codec_type(cv4l_fd &fd)
 	return NOT_CODEC;
 }
 
-static int get_cap_compose_rect(cv4l_fd &fd)
+static void get_cap_compose_rect(cv4l_fd &fd)
 {
 	cv4l_disable_trace dt(fd);
 	v4l2_selection sel;
@@ -407,14 +407,12 @@  static int get_cap_compose_rect(cv4l_fd &fd)
 		support_cap_compose = true;
 		composed_width = sel.r.width;
 		composed_height = sel.r.height;
-		return 0;
-	}
-
-	support_cap_compose = false;
-	return 0;
+	} else {
+		support_cap_compose = false;
+    }
 }
 
-static int get_out_crop_rect(cv4l_fd &fd)
+static void get_out_crop_rect(cv4l_fd &fd)
 {
 	cv4l_disable_trace dt(fd);
 	v4l2_selection sel;
@@ -427,11 +425,9 @@  static int get_out_crop_rect(cv4l_fd &fd)
 		support_out_crop = true;
 		cropped_width = sel.r.width;
 		cropped_height = sel.r.height;
-		return 0;
+	} else {
+		support_out_crop = false;
 	}
-
-	support_out_crop = false;
-	return 0;
 }
 
 static void set_time_stamp(cv4l_buffer &buf)