Re: Thank You -- Thomas J. Gritzan
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Tue, 12 Sep 2006 08:54:16 +0000
Tom said:
<snip>
Now I am using malloc(), realloc() and free(). I am casting the
pointer output of malloc() and realloc() to match my data structure.
Why?
(The need for this casting is poorly described in the realloc() doco
in my opinion.)
There is no such need. The cast is unnecessary and obfuscatory, and can
conceivably conceal the bug of failing to provide a prototype for *alloc,
which happens from time to time.
<snip>
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.
- Follow-Ups:
- Re: Thank You -- Thomas J. Gritzan
- From: Tom
- Re: Thank You -- Thomas J. Gritzan
- References:
- Thank You -- Thomas J. Gritzan
- From: Tom
- Thank You -- Thomas J. Gritzan
- Prev by Date: Re: for(;0;) printf("hello");
- Next by Date: Re: Smart Pointers: Is there something similar to smart pointers in C?
- Previous by thread: Thank You -- Thomas J. Gritzan
- Next by thread: Re: Thank You -- Thomas J. Gritzan
- Index(es):
Relevant Pages
|