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.

Just my two cents on the issued.

    .......  [EMAIL PROTECTED]
     `:::'     Kevin Sivits  .......  ......
      :::  *                  `::.    ::'    one world
      ::: .::  .:.::.  .:: .::  `::. :'      one people 
      :::  ::   ::  ::  ::  ::    :::.      one goverment
      ::: .::. .::  ::.  `::::. .:'  ::.       one OS
    ..:::.....................::'   .::::.


Reply via email to