gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH] Be more explicit about the return value from gps_


From: Gary E. Miller
Subject: Re: [gpsd-dev] [PATCH] Be more explicit about the return value from gps_close() is not used.
Date: Tue, 2 Aug 2016 17:10:24 -0700

Yo Robert!

Patch applied.

In general I'm a fan of checking EVERY return value.  So I would hope
you would go one step further and output a warning/error when gps_close()
fails.

The squeaky wheel gets the grease and error messages squeak.

On Sat, 30 Jul 2016 18:09:01 +0000
Robert Norris <address@hidden> wrote:

> ---
>  libgpsmm.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libgpsmm.cpp b/libgpsmm.cpp
> index a12d975..ba4aeb0 100644
> --- a/libgpsmm.cpp
> +++ b/libgpsmm.cpp
> @@ -91,7 +91,7 @@ bool gpsmm::is_open(void)
>  gpsmm::~gpsmm()
>  {
>      if ( to_user != NULL ) {
> -     gps_close(gps_state());
> +     (void)gps_close(gps_state());
>       delete to_user;
>      }
>  }




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

Attachment: pgpSS8iSFHVTv.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]