[Bf-committers] Some words about a strange thing named "coding-rules"

Yomgui yomgui1 at gmail.com
Thu Nov 24 09:44:04 CET 2005


Hi to all Blender developers,

During my port of Blender on MorphOS and a try to bring to blender a
nice OS abstraction layer, I've seen some ugly code lines. So, I want
to advise all developers about that:

MEM_mallocN/MEM_callocN and all derivated, declared in
intern/guardedalloc/mallocn.c, may return a null pointer (0) in some
cases (i.e. not enough memory), but...

... I seen too many files that use these functions without any
checking of the return value!

The result of the usage of a null pointer is totally platform
dependent, and may cause the whole crash of the platform in the worst
case (I think that there is no best case ;-))

So please, can you check your code and design it to handle this case?
It's very important to have a good and clean software.

Many thanks for your attention,
Guillaume R.


More information about the Bf-committers mailing list