Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 2004 12:45:14 -0400
From:      Brian Feldman <green@freebsd.org>
To:        Christian Weisgerber <naddy@mips.inka.de>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: ether_crc32_[bl]e()
Message-ID:  <20040531164514.GA7776@green.homeunix.org>
In-Reply-To: <c9d9u3$o6k$1@kemoauc.mips.inka.de>
References:  <c9d9u3$o6k$1@kemoauc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 30, 2004 at 06:42:11PM +0000, Christian Weisgerber wrote:
> NetBSD and OpenBSD have two helper functions in if_ethersubr.c
> 
> ether_crc32_le(const u_int8_t *buf, size_t len)
> ether_crc32_be(const u_int8_t *buf, size_t len)
> [...]
> The patch below adds the functions to if_ethersubr.c and, as an
> example, switches re(4) to make use of this.
> 
> 1. Do we want this?

Yeah :)

> 2. If yes, there are probably stylistic issues I could use some
>    help with.

Here are what looks like style bugs to me:

The header changes aren't using tabs to line up the function names
and return values with the ones in the rest of the prototypes, and
should be sorted in lexically, besides.  Inside the functions, size_t
may or may not be larger than uint32_t, but should never be smaller
on FreeBSD, so it should come sorted before them.  I'm not sure if
it is a style bug to perpetuate BSD u_intsize_t when uintsize_t is
standardized and available as well.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040531164514.GA7776>