diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-24 09:39:04 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-24 09:39:04 +0000 |
commit | c5096a31de6493c9d88d72bc339e50a45afd052d (patch) | |
tree | 0d1f350be669fd8b6c5db3e9977b9bb89128763e | |
parent | b1775d81a7f681ce1e6dc4db4020081789995927 (diff) | |
download | libnsgif-c5096a31de6493c9d88d72bc339e50a45afd052d.tar.gz libnsgif-c5096a31de6493c9d88d72bc339e50a45afd052d.tar.bz2 |
Util: Improve host endian detection for older GCCs.
Co-authored-by: John-Mark Bell <jmb@netsurf-browser.org>
-rw-r--r-- | src/gif.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1364,9 +1364,9 @@ void nsgif_destroy(nsgif_t *gif) */ static inline bool nsgif__host_is_little_endian(void) { - static const uint16_t test = 1; + const uint16_t test = 1; - return ((const uint8_t *) &test)[0] == 1; + return ((const uint8_t *) &test)[0]; } static struct nsgif_colour_layout nsgif__bitmap_fmt_to_colour_layout( |