cvs commit: src/sys/sys param.h

Kip Macy kip.macy at gmail.com
Thu Dec 6 11:04:16 PST 2007


On Dec 6, 2007 2:25 AM, Bruce Evans <brde at optusnet.com.au> wrote:
>
> On Thu, 6 Dec 2007, Kip Macy wrote:
>
> > kmacy       2007-12-06 04:00:59 UTC
> >
> >  FreeBSD src repository
> >
> >  Modified files:
> >    sys/sys              param.h
> >  Log:
> >  Respect the fact that the value a may be constant so cast to const uint8_t *
> >
> >  Revision  Changes    Path
> >  1.318     +2 -2      src/sys/sys/param.h
>
> The correct fix is to back out 1.317.  If not, at least spell `unsigned
> char' correctly and fix the other new style bug (a line longer than
> 80 characters from adding `const').  Using uint8_t is only a style bug
> since POSIX probably requires unsigned char to be the same as uint8_t.
> If unsigned char is larger than uint8_t, then revs.1.317-318 give
> undefined behaviour (aliasing bugs) and clearly broken behaviour (wrong
> divisor NBBY).  These bugs are easy to avoid by using the correct
> spelling.
>

I'm inclined to do whatever you say so long as my code works without a
substantial rewrite. However, can you please point me at where it says
uint8_t is not style(9) compliant?

Thanks.
 -Kip


More information about the cvs-all mailing list