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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Those functions always return 0, hence change their prototype to void.

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

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)
-- 
2.35.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux