[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12454] trunk/blender/source/blender/src/ editipo.c: Typo fix for my previous commit...

Alexander Ewering blender at instinctive.de
Fri Nov 2 05:10:18 CET 2007


On Fri, 2 Nov 2007, Joshua Leung wrote:

> Typo fix for my previous commit... wrong-sized array was being allocated, but somehow this still managed to work fine last night.

That is because the operating system assigns memory in big chunks anyway,
so you mostly get at least a few kilobytes.

> -	 * already done
> +	 * already done (assumes sizeof(char)==1)

I think this comment just creates confusion, as sizeof(char)==1 is the *definition* of
sizeof itself.

"The fundamental unit of storage in C is the char, and by definition
sizeof(char)
is equal to 1, so you could allocate space for an array of ten chars with
malloc(10)"

</codepolice> ;)

Anyway, just wanting to clear up possible confusion...

Alexander Ewering


[ i n s t i n c t i v e . ]      instinctive mediaworks

Zur Waldeshoehe 6                    Tel.: 02393-220558
59846 Sundern                         Fax: 02393-220559
Germany                xx-mail: xx-mail.com/instinctive


More information about the Bf-committers mailing list