[PATCH] include/platform.h: Define KERNEL_VERSION
unconditionally
Shaun Jackman
sjackman at gmail.com
Tue Jun 6 13:56:19 PDT 2006
I was only being troubled by network/interface.c. If that check can go
away, then I have no further complaints.
On 6/6/06, Rob Landley <rob at landley.net> wrote:
> On Thursday 01 June 2006 11:48 am, Shaun Jackman wrote:
> > [1] 2. Thou shalt not follow the NULL pointer, for chaos and madness
> > await thee at its end.
I should have mentioned that I was quoting `The Ten Commandments for C
Programmers (Annotated Edition)' by Henry Spencer. These are not my
words. Sorry for the confusion.
> And on linux and any other sane unix-like system going back to the 1970's we
> have an inaccessible page mapped there and any attempt to read from it or
> write to it gives a clean segfault.
On an embedded system without an MMU or even an MPU, this desirable
feature is sadly not an option. Considering uClinux is only a
configuration of Linux these days, your statement is false.
> > A null pointer doth not point to a 0 of any type,
>
> Yes, it does. And we check for this all over the place.
>
> if(!thing || !*thing) blah.
>
> Any system that doesn't understand that is too stupid to live, and will NEVER
> be supported. Period. Full stop.
It's not saying that a NULL pointer is not 0, this is in fact defined
by the C standard. It's saying that dereferensing the NULL pointer
does not necessarily give another NULL pointer. There used to be
systems that depended on assert(*NULL == NULL), allowing your above
test to be reduced to simply if(!*thing), which used to be a common
idiom for if(thing == NULL || *thing == NULL).
> > despite some blasphemous old code which impiously assumes this.
>
> You are, quite simply, wrong.
... unless you've misunderstood the original statement. Although, I
suppose all rebuttals have to start with the basic assumption that the
opposition has understood the proposition's argument.
Cheers,
Shaun
More information about the busybox
mailing list