Re: ether_crc32_[bl]e()

From: Brian Feldman (green_at_freebsd.org)
Date: 05/31/04

  • Next message: M. Warner Losh: "Re: ether_crc32_[bl]e()"
    Date: Mon, 31 May 2004 12:45:14 -0400
    To: Christian Weisgerber <naddy@mips.inka.de>
    
    

    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.                       \,,,,,,,,,,,,,,,,,,,,,,\
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: M. Warner Losh: "Re: ether_crc32_[bl]e()"