Re: [AD] [PATCH] Solaris Fixes and dev notes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 6/5/05, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> On Sun, 2005-06-05 at 12:29 -0500, Shawn Walker wrote:
> > That is something that bothers me, so I'm going to bump a SUN engineer
> > if I can and see if this holds true in general, I'm thinking it
> > probably does.
> >
> 
> At least, according to google, I'm not alone in having relied on the
> NULL-handling behavior:
> 
> http://mail.jabber.org/pipermail/jabberd/2003-December/001201.html

These are the responses I got from the Solaris community and SUN people:

"Yes, system 5 has always done exactly what you told it to do. The '(null)'
 extension was added in BSD and picked up in Linux. To be safe use
 printf("%s", variable?variable:"(null)");" - Dave Lampe

"Yes; (null) is not a valid pointer to a string so you are getting undefined
 behaviour; our pilosophy is that it is best to detect such errors rather
 than hide them by continuing." - Casper Dik (SUN Engineer)

So, in the future, for portability's sake, anywhere that data can be
null should be conditionalized first.

-- 
Shawn Walker, Software and Systems Analyst
binarycrusader@xxxxxxxxxx - http://binarycrusader.blogspot.com/




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/