Re: [PATCH 1/3] libnfnetlink byte alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fabian Hugelshofer wrote:
Patrick McHardy wrote:
Fabian Hugelshofer wrote:
Aligns buffers to maximum alignment of architecture to make the cast of
char pointers to struct pointers more portable.

Signed-off-by: Fabian Hugelshofer <hugelshofer2006@xxxxxx>

They all seem fine to me, but a union might make it look
a bit nicer :)

In libnfnetlink the union does not make sense, because multiple casts are done from the same buffer at different locations.

For libnetfilter-(conntrack|log) the union would be possible:
[...]

I can rewrite it like this, if desired...

I'll leave that up to Pablo, thanks for the explanation.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux