]> git.puffer.fish Git - mirror/frr.git/commit
lib: fix endianness bug in prefix.c
authorRenato Westphal <renatowestphal@gmail.com>
Fri, 23 Mar 2012 19:27:40 +0000 (16:27 -0300)
committerDavid Lamparter <equinox@diac24.net>
Fri, 23 Mar 2012 19:51:28 +0000 (20:51 +0100)
commitfe67e668881b8b8d71b1570575c913cd287fafcf
treece48b0028e879d4e6f938bb9dd583ed9f679fa96
parentaee567450eaf32877d00f47c4cc5d05c5fb85a51
lib: fix endianness bug in prefix.c

While defining two "maskbytes" arrays for the respective endiannesses,
the code was unconditionally using one that only worked on little endian
systems.

Use preprocessor macros to avoid the somewhat expensive
htonl/ntohl macros.

From: Renato Westphal <renatowestphal@gmail.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
lib/prefix.c