Re: malloc trouble



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.

.



Relevant Pages

  • Re: OT: Why I like driving an older car
    ... Bottom line....this man of obvious stupidity has made a lot more money than you, Stevie. ... Liability coverage to him is not about being fiscally ...
    (alt.vacation.las-vegas)
  • Re: Thanks, Misc!
    ... > hooked up and am waiting for the "computer guy" to come over. ... > started scanning via Google groups, but alas, it isn't real user ... The key to quoting with the current interface is to NOT use the ... "Reply" link at the bottom of the article. ...
    (alt.smokers.cigars)
  • Re: am I hacked?
    ... pointing it out! ... In /etc/aliases, near the bottom, you'll see a line that you should ... Manuel Arostegui Ramirez. ...
    (Fedora)
  • Re: whats the best environment to exercise Perl?
    ... >>automatically stay on the top of quoting. ... >>I asked a man who knows the history of Usenet, ... >>you reply in bottom and I wrote in top, you think this also my fault? ... Avoiding top-posts is a rule that you have to obey ...
    (comp.lang.perl.misc)
  • Re: Snipping (was: Flying as Therapy)
    ... > Gregg -- ... > Do you really believe quoting 150 lines for a line and a half response is ... Some put their replies on top of 150 line quotes - others at the bottom. ...
    (rec.aviation.piloting)

Loading