libctf: fix ctf_archive_count return value on big-endian
authorNick Alcock <nick.alcock@oracle.com>
Tue, 30 Jul 2024 11:28:04 +0000 (12:28 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 1 Aug 2024 13:30:21 +0000 (14:30 +0100)
commit5def238cf9e089e3712d9e01c425ef55fed48805
tree0796612a7540d3bdcffd5103659fc8288469e4e5
parent51dac5ecd76f72a6f1ccbe598edbed4e1f94fbb7
libctf: fix ctf_archive_count return value on big-endian

This failed to properly byteswap its return value.

The ctf_archive format predates the idea of "just write natively and
flip on open", and byteswaps all over the place.  It's too easy to
forget one.  The next revision of the archive format (not versioned,
so we just tweak the magic number instead) should be native-endianned
like the dicts inside it are.

libctf/
* ctf-archive.c (ctf_archive_count): Byteswap return value.
libctf/ctf-archive.c