Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/sys



In message: <20040104070330.1849.qmail%mail.netbsd.org@localhost>
            Dave Sainty <dave%dtsp.co.nz@localhost> writes:
: Well, the given change was apparently for an application program.  For
: user-land programs I think it's hard enough to achieve compatibility
: between systems as it is, without imposing OUR particular header
: dependencies on the world and expecting application programmers to get
: them right.

Actually, it is documented in sysctl(3):

SYNOPSIS
     #include <sys/param.h>
     #include <sys/sysctl.h>

     int
     sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
         size_t newlen);

So the 'it is too hard' arugment isn't really a strong one.  The fact
that it might happen to work when you don't do things documented in
the man page is no less a bug as passing an uncast NULL to a varadic
function.  Sure, it might seem to work, but there are environements
where it won't work.

Since it is documented, as the first poster to this thread said, I
tend to agree that it should be backed out.

Warner



Home | Main Index | Thread Index | Old Index