Changed more malloc to HeapAlloc calls

Michael Stefaniuc mstefani at redhat.com
Thu Oct 30 07:55:24 CDT 2008


Pete Myers wrote:
>> In addition to what James said please split the patch up; one patch per
>> module. A dll or program is a "module".
> 
> Sorry, I'm inundated with noobie errors here I think.
No problem. Janitorial tasks are really good to accustom new people to 
the patch submission process.

>> Also while you are at it please remove the superfluous casts in the lines
>> you are changing. HeapAlloc (malloc too) returns a void pointer which
>> doesn't needs to be casted to an other pointer type. E.g.
> 
> Will do.  Didn't want to change coding style.
Well that's not coding style. Superfluous casts are evil. I have even 
created a new janitorial tasks for that: 
http://wiki.winehq.org/SuperfluousCasts

Also if one has to touch a line it is expected from him to fix all 
errors in that line. That includes dangling whitespace at the end of the 
line and mixed tab and space indentation.

> Actually my big struggle at the moment is trying to figure out where
> malloc() memory gets free().  What's the policy here?  Should
Just search for free in that file.

> HeapAlloc() always be set free...  Is the fact that some malloc()
> memory not free()'d an error, or a policy?  Or should I work harder to
You need to replace the free calls with HeapFree calls.

> find out where free() gets called?
grep -w free dlls/iphlpapi/tests/iphlpapi.c dlls/wnaspi32/winaspi16.c
That will do.

bye
	michael



More information about the wine-devel mailing list