[apparmor] [patch 18/26] Convert to htoleXX fns instead of ifdef on endian

Steve Beattie steve at nxnw.org
Mon Mar 31 01:07:34 UTC 2014


On Sat, Mar 29, 2014 at 06:17:58PM -0500, Tyler Hicks wrote:
> On 2014-03-29 02:26:34, John Johansen wrote:
> > On 03/28/2014 08:52 AM, Tyler Hicks wrote:
> > > On 2014-03-27 08:45:31, john.johansen at canonical.com wrote:
[SNIP]

> > >> +#define le16_to_cpu(x) ((uint16_t)(letoh16 (*(uint16_t *) x)))

> > > 
> > > You didn't pick up your feedback from the original thread. This should
> > > be le16toh().
> > > 
> > err? it is.
> > 
> > Quadruple checked in my queue and then here. Steve's patch used to use
> > htole16
> 
> Ah, sorry for the confusion. Now I see what happened...
> 
> You *did* change it from Steve's patch that used htole16(), but the new
> function name isn't right. It is letoh16() in your patch and it should
> be le16toh().

Actually, I'm the one who managed to get that function wrong twice
now (jj pulled in my second version which had this wrong).

You're correct, it should be le16toh(), though it bemuses me that the
parser compiles with it defined incorrectly.

Thanks.

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140330/f77b9bf1/attachment.pgp>


More information about the AppArmor mailing list