From 2090f8fdd8f903683349f650ac572c15cd8a224e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Thu, 21 Feb 2019 00:13:02 +0100 Subject: cam: fix return type of configureStreams() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The only caller of configureStreams() stores its return value as an int and not bool. This is confusing and also prevents the (possibly) different error codes returned by Camera::configureStreams() to be propagated inside the cam tool. Fix this by changing the return type to int and propagate the return value from the camera. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/cam/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cam/main.cpp b/src/cam/main.cpp index 9b67ab75..7c47ce65 100644 --- a/src/cam/main.cpp +++ b/src/cam/main.cpp @@ -78,7 +78,7 @@ static int parseOptions(int argc, char *argv[]) return 0; } -static bool configureStreams(Camera *camera, std::vector &streams) +static int configureStreams(Camera *camera, std::vector &streams) { KeyValueParser::Options format = options[OptFormat]; Stream *id = streams.front(); @@ -98,10 +98,7 @@ static bool configureStreams(Camera *camera, std::vector &streams) config[id].pixelFormat = format["pixelformat"]; } - if (camera->configureStreams(config)) - return false; - - return true; + return camera->configureStreams(config); } static void requestComplete(Request *request, const std::map &buffers) -- cgit v1.2.1