[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-libc-dev] Re: Request for cbrt() and strdup to be addedtolibc
From: |
Weddington, Eric |
Subject: |
RE: [avr-libc-dev] Re: Request for cbrt() and strdup to be addedtolibc |
Date: |
Sun, 22 Jun 2008 20:51:09 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Russell Shaw
> Sent: Sunday, June 22, 2008 8:48 PM
> Cc: address@hidden
> Subject: Re: [avr-libc-dev] Re: Request for cbrt() and strdup
> to be addedtolibc
>
> >> if (copy == NULL)
> >> return NULL;
> >>
> >> generates the same (or less) code.
> >
> > Good catch. Regardless whether it generates the same code or not, it
> > should be compared to NULL anyway because one should never
> rely on NULL
> > being zero. Since copy is a pointer, it should be compared
> to NULL, and
> > not with a logical NOT operator.
>
> http://c-faq.com/null/ptrtest.html
>
> I always use "if(!copy)..."
That doesn't make it right.
- [avr-libc-dev] RE: Request for cbrt() and strdup to be added to libc, Weddington, Eric, 2008/06/22
- [avr-libc-dev] Re: Request for cbrt() and strdup to be added to libc, Andy H, 2008/06/22
- Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be added to libc, Joerg Wunsch, 2008/06/22
- Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be added to libc, Joerg Wunsch, 2008/06/22
- RE: [avr-libc-dev] Re: Request for cbrt() and strdup to be added tolibc, Weddington, Eric, 2008/06/22
- Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be added tolibc, Joerg Wunsch, 2008/06/22
- RE: [avr-libc-dev] Re: Request for cbrt() and strdup to be addedtolibc, Weddington, Eric, 2008/06/22
- Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be addedtolibc, Joerg Wunsch, 2008/06/22
- Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be added tolibc, Russell Shaw, 2008/06/22
- RE: [avr-libc-dev] Re: Request for cbrt() and strdup to be addedtolibc,
Weddington, Eric <=
- Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be addedtolibc, Joerg Wunsch, 2008/06/23
- RE: [avr-libc-dev] Re: Request for cbrt() and strdup to be addedtolibc, Weddington, Eric, 2008/06/23
- Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be added to libc, Joerg Wunsch, 2008/06/22