[libcamera-devel] [PATCH 21/30] cam: Drop unneeded error check and message
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Jul 12 20:41:37 CEST 2021
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 at ideasonboard.com>
>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at 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;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list