Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
Re: Cruft: drop htonl() etc. from libc
To:
Miod Vallat <miod@online.fr>
Cc:
Christian Weisgerber <naddy@mips.inka.de>, tech@openbsd.org
Date:
Fri, 12 Apr 2024 11:40:10 +0200

Download raw body.

Thread
On Fri, Apr 12, 2024 at 07:18:54AM +0000, Miod Vallat wrote:
> > > +	return __htobe16(x);
> > 
> > This looks the wrong way around. ntohs() is be16toh(). Same for ntohl
> > above. While it does not matter for our cases I think we should use the
> > right conversions here.
> 
> I had this concern, too, but since we define be16toh as __htobe16 this
> doesn't really matter.

I still would prefer if it used the right function name even if behind the
curtain all is the same.

-- 
:wq Claudio