[OpenAFS-devel] Trying to code for Mac OS X

Russ Allbery rra@stanford.edu
Mon, 30 Mar 2009 16:09:09 -0700


Felix Frank <Felix.Frank@Desy.de> writes:
> On Wed, 25 Mar 2009, Barry Fawthrop wrote:

>> Yes it is very strict
>> for example when I was building the kerberos functions they would have
>>
>>  char *name
>>  name = malloc(sizeof(name));
>>
>> This would throw and error about void * and char *
>>
>> I had to change to the following
>>
>>  name = (char *)malloc(sizeof(name));
>
> I guess the code is sloppy that way here and there, yes.

No, this change is wrong in C.  The original is correct.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>