On Sat, Feb 25, 2023 at 02:35:23PM -0800, Hal Murray wrote:
> 
> richardcoch...@gmail.com said:
> >> +  NTOHS(atoi->type);
> >> +  NTOHS(atoi->length);
> > These two lines are wrong.  The net/host conversion of type and length
> > already happened in suffix_post_recv() in msg.c 
> 
> They may be wrong in the sense of duplicating work that has already been 
> done, 
> but they are also wrong in the sense of not doing anything.
> 
> NTOHS doesn't update it's argument.  It returns a result which isn't being 
> stored anyplace.

In tlv.c NTOHS is a macro and not a function.  It doesn't return anything at 
all.

        #define HTONS(x) (x) = htons(x)

See?

Thanks,
Richard




_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to