Message ID | 20210707021941.20804-22-laurent.pinchart@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
On 07/07/2021 03:19, Laurent Pinchart wrote: > The EventLoop::exec() function returns the exit code of the event loop, > not an error status. Drop the corresponding error check and error > message. Should the event loop return code be propagated to the application return code though? It doesn't currently anyway so: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/cam/main.cpp | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/src/cam/main.cpp b/src/cam/main.cpp > index 2ef26353e712..19ed9837cf4f 100644 > --- a/src/cam/main.cpp > +++ b/src/cam/main.cpp > @@ -313,9 +313,7 @@ int CamApp::run() > > if (options_.isSet(OptMonitor)) { > std::cout << "Press Ctrl-C to interrupt" << std::endl; > - ret = loop_.exec(); > - if (ret) > - std::cout << "Failed to run monitor loop" << std::endl; > + loop_.exec(); > } > > return 0; >
Hi Kieran, On Mon, Jul 12, 2021 at 04:47:05PM +0100, Kieran Bingham wrote: > On 07/07/2021 03:19, Laurent Pinchart wrote: > > The EventLoop::exec() function returns the exit code of the event loop, > > not an error status. Drop the corresponding error check and error > > message. > > Should the event loop return code be propagated to the application > return code though? That's entirely up to us, if we consider there's a need to do so. It wouldn't really serve any purpose right now. > It doesn't currently anyway so: > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > src/cam/main.cpp | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/src/cam/main.cpp b/src/cam/main.cpp > > index 2ef26353e712..19ed9837cf4f 100644 > > --- a/src/cam/main.cpp > > +++ b/src/cam/main.cpp > > @@ -313,9 +313,7 @@ int CamApp::run() > > > > if (options_.isSet(OptMonitor)) { > > std::cout << "Press Ctrl-C to interrupt" << std::endl; > > - ret = loop_.exec(); > > - if (ret) > > - std::cout << "Failed to run monitor loop" << std::endl; > > + loop_.exec(); > > } > > > > return 0;
diff --git a/src/cam/main.cpp b/src/cam/main.cpp index 2ef26353e712..19ed9837cf4f 100644 --- a/src/cam/main.cpp +++ b/src/cam/main.cpp @@ -313,9 +313,7 @@ int CamApp::run() if (options_.isSet(OptMonitor)) { std::cout << "Press Ctrl-C to interrupt" << std::endl; - ret = loop_.exec(); - if (ret) - std::cout << "Failed to run monitor loop" << std::endl; + loop_.exec(); } return 0;
The EventLoop::exec() function returns the exit code of the event loop, not an error status. Drop the corresponding error check and error message. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- src/cam/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)