Kevin Sivits wrote:

> On Wed, 17 Jun 1998, CyberPeasant wrote:
>
> > James wrote:
>
> > >     listy = (line *) malloc (sizeof (line));
> >
> > No need to cast the return of malloc.
>
> Seems like casting the malloc return type is good style to me.  It has
> helped me catch errors to stupid mistakes like:
>
>   char *pointer;
>   pointer=(int *)malloc(sizeof(int));
>
> This is also required in C++ and makes moving old code to C++ eaiser IMHO.
>
>

That's what I was taught also. Nowaday's I include it out of force of habit
more than anything else.

/John

"I didn't learn it...He taught it to me"




--
email: [EMAIL PROTECTED]
Local mailserver  , remote

Stamp out oppression!!





Reply via email to