[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/blenloader/intern writefile.c

Martin Poirier theeth at yahoo.com
Fri Oct 27 22:03:58 CEST 2006



--- Alexander Ewering <blender at instinctive.de> wrote:

> Apart from being redundant, why would anyone ever
> pass NULL to a function
> that is supposed to do something with the argument?
> It would be the task of
> the calling function to make sure that it doesn't
> pass NULL.

Or rather, use ASSERT(foo != NULL), so it can be
tested when debugging but doesn't affect releases.
That is, assuming receiving NULL as parameter has no
meaning, in which case, it's much better to trace it
than to ignore it.

> This slightly thoughtless "do everything so that
> code analysis tool foo / bar 
> is quiet" probably more increases noise in the code
> than what it's worth.

I disagree, while simply bailing out on NULL might not
be the optimal solution, it's much better then
crashing.

Martin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bf-committers mailing list