[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be added tolibc
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] Re: Request for cbrt() and strdup to be added tolibc |
Date: |
Sun, 22 Jun 2008 22:35:26 +0200 |
User-agent: |
Mutt/1.5.11 |
As Weddington, Eric wrote:
> 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.
In C, the only possible definitions for NULL are "0" or "((void *)0)".
In C++, IIRC only "0" is possible.
> Since copy is a pointer, it should be compared to NULL, and
> not with a logical NOT operator.
That's my point. It's not a Boolean operation but a comparison
against a null pointer. The test against NULL just makes that
more obvious.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
- [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 <=
- 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, 2008/06/22
- 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