Re: malloc trouble
- From: "ncf" <nothingcanfulfill@xxxxxxxxx>
- Date: 7 Oct 2005 15:25:34 -0700
Alrighty, yea, I didn't know how to reply w/ quoting for a bit out of
my own stupidity, but thanks for pointing out how ;P
I'll keep it in mind not to cast malloc()'s return
Thanks :)
Christopher Benson-Manica wrote:
> ncf <nothingcanfulfill@xxxxxxxxx> wrote:
>
> > Alrighty, I just checked one comp.lang.c faq (located at
> > http://www.faqs.org/faqs/C-faq/faq/), and to be quite honest, the code
> > they're using is making little sense to me, but I will give it a shot.
>
> It is proper Usenet etiquette to include the text you are replying to.
> To do this using Google groups, please follow the instructions below,
> penned by Keith Thompson:
>
> If you want to post a followup via groups.google.com, don't use
> the broken "Reply" link at the bottom of the article. Click on
> "show options" at the top of the article, then click on the
> "Reply" at the bottom of the article headers.
>
> > if ( (messages[num_messages] = (char *)malloc((size_t)BUFFLEN))
>
> It isn't in the FAQ, but should be: Casting the return of malloc() is
> both unnecessary and inadvisable. Read this group's archives for
> details.
>
> --
> Christopher Benson-Manica | I *should* know what I'm talking about - if I
> ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
.
- References:
- malloc trouble
- From: ncf
- Re: malloc trouble
- From: Artie Gold
- Re: malloc trouble
- From: ncf
- Re: malloc trouble
- From: Christopher Benson-Manica
- malloc trouble
- Prev by Date: Re: null function pointer?
- Next by Date: Re: Looking for a C program to parse CSV
- Previous by thread: Re: malloc trouble
- Next by thread: Re: malloc trouble
- Index(es):
Relevant Pages
|
Loading