gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH] Improved resilience in gps_shm_close() in case it


From: Fred Wright
Subject: Re: [gpsd-dev] [PATCH] Improved resilience in gps_shm_close() in case it is called after an unsuccessful gps_shm_open()
Date: Thu, 4 Aug 2016 11:01:38 -0700 (PDT)

On Tue, 2 Aug 2016, Gary E. Miller wrote:
> On Tue, 02 Aug 2016 17:41:25 -0700
> Hal Murray <address@hidden> wrote:
>
> > I do a double take when I see it, but I smile as soon as I figure out
> > what's going on and that doesn't take long.  I figure I'll get used
> > to it before long, sooner if more people use it.
>
> IMHO, the double take is half the benefit.  Which does sort of
> diminish with familiarity.
>
> The first time it catches a typo you'll likely be sold.  How
> often have you spent hours looking for a bug like this:
>
>       if ( my_pointer = NULL)

Not in a long time.  GCC has been giving warnings about that mistake for
at least a decade, so there's no longer much reason to write the
conditional in a way that reads less naturally (except, perhaps, to Yoda).

Fred Wright



reply via email to

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