[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: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] [PATCH] Improved resilience in gps_shm_close() in case it is called after an unsuccessful gps_shm_open() |
Date: |
Tue, 2 Aug 2016 17:48:30 -0700 |
Yo Hal!
On Tue, 02 Aug 2016 17:41:25 -0700
Hal Murray <address@hidden> wrote:
> > And when I do that, I prefer the constant on the LEFT side. I find
> > it allows the compiler to catch some non-obvious errors.
> > But that drives Eric batty, so avoid that for now. :-)
>
> I thought Eric had learned to live with that. I hope he speaks up.
I think his asset was conditional...
Eric is in the woods at a weapons training retreat, so expect little
from him for a while. I picked my moment carefully. :-)
> 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)
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
address@hidden Tel:+1 541 382 8588
pgpeyLmDosGLr.pgp
Description: OpenPGP digital signature