summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-03-24 09:39:04 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2022-03-24 09:39:04 +0000
commitc5096a31de6493c9d88d72bc339e50a45afd052d (patch)
tree0d1f350be669fd8b6c5db3e9977b9bb89128763e
parentb1775d81a7f681ce1e6dc4db4020081789995927 (diff)
downloadlibnsgif-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gif.c b/src/gif.c
index 6d10898..b37b517 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -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(