[OPEN-ILS-DEV] PATCH: srfsh.c (more on shelling out)

Mike Rylander mrylander at gmail.com
Fri Jul 13 10:57:22 EDT 2007


On 7/13/07, Scott McKellar <mck9 at swbell.net> wrote:
>
> --- Mike Rylander <mrylander at gmail.com> wrote:
>
> > BTW, I've attempted to find evidence of a platform where NULL is not
> > all-0-bits and failed, though this only exposes my inability to tell
> > google what I want to find.
>
> See the C FAQ, question, 5.17:
>
>     http://c-faq.com/null/machexamp.html
>
> See also questions 5.16 and 7.31.
>
> This part of the FAQ probably hasn't been updated for over fifteen
> years, and the machines mentioned are no doubt museum pieces by now.
> I don't know if any current machines represent NULL with non-zeros.
> Any such machines are probably far out of the mainstream, and will
> likely never attempt to run Evergreen.

Heh ... I'll personally fix any NULL/0 assumptions that cause problems
if someone can get all the dependencies going on a Honeywell-Bull
mainframe. ;)

In all seriousness, though, I have no problem with pedantism.
Changing to malloc() with no memset or to a static array is fine with
me.

UPDATE: changed back to an array.  No reason not to, and there is a
provable benefit to speed for a sufficient number of iterations.

>
> Nevertheless I don't like making needlessly non-portable assumptions,
> especially when those assumptions are neither obvious nor documented.
> You may of course not wish to be as pedantic as I am.
>

Oh, it's not that all.  The trailing NULL is still there, so
portability is maintained, I believe.

--miker


More information about the Open-ils-dev mailing list