Re: Weird malloc behaviour
- From: jt@xxxxxxxxxxx (Jens Thoms Toerring)
- Date: 31 Jul 2008 09:15:25 GMT
leptone@xxxxxxxxx wrote:
Thank you for the suggestions, I will apply them in the "real
code" (this was just a test routine btw written in haste, although I
must admit that I still get quite brain damaged by type casting ;))...
Keep staying wary about casts. Much too often they are used without
good reason (or for bad reasons, i.e. to keep the compiler from com-
plaining about something suspicious). Only use them if you exactly
know why you have to do it and only if there's no better way. In most
situations the compiler should be able to figure things out. Only if
you made sure that it can't a cast should be used and then it will
serve as a flag to the reader of the code that something special is
going on at that place.
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@xxxxxxxxxxx
\__________________________ http://toerring.de
.
- References:
- Weird malloc behaviour
- From: leptone
- Re: Weird malloc behaviour
- From: Jens Thoms Toerring
- Re: Weird malloc behaviour
- From: Kenneth Brody
- Re: Weird malloc behaviour
- From: leptone
- Re: Weird malloc behaviour
- From: santosh
- Re: Weird malloc behaviour
- From: leptone
- Weird malloc behaviour
- Prev by Date: Re: stream io in c
- Next by Date: Re: stream io in c
- Previous by thread: Re: Weird malloc behaviour
- Next by thread: Re: Weird malloc behaviour
- Index(es):