Re: [Linuxptp-devel] [PATCH v4] Strip PRP trailer
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Miroslav L. <mli...@re...> - 2022-08-08 10:36:46
|
On Mon, Aug 08, 2022 at 12:20:30PM +0200, Erez wrote: > On Mon, 8 Aug 2022 at 11:56, Magnus Armholt <mag...@gm...> > wrote: > > +static int has_prp_trailer(unsigned char *ptr, int cnt, int eth_hlen) > > > > A POSIX function usually uses 0 as success and negative on failure. > In order to avoid confusion, it is better to use the boolean type here. > You may include <stdbool.h> to define the type. There are other is_* and has_* functions that return 1 for true. It's not a success or failure. If they should be declared as boolean, it would be nice to convert them all avoid confusion. -- Miroslav Lichvar |