Gitweb links:

...log 
http://git.netsurf-browser.org/libnsutils.git/shortlog/b320babd590a54588a3f568aa31f854133e850f2
...commit 
http://git.netsurf-browser.org/libnsutils.git/commit/b320babd590a54588a3f568aa31f854133e850f2
...tree 
http://git.netsurf-browser.org/libnsutils.git/tree/b320babd590a54588a3f568aa31f854133e850f2

The branch, master has been updated
       via  b320babd590a54588a3f568aa31f854133e850f2 (commit)
      from  142a7945fb9fe477324f8df5e9645ef161042483 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libnsutils.git/commit/?id=b320babd590a54588a3f568aa31f854133e850f2
commit b320babd590a54588a3f568aa31f854133e850f2
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Endian: Improve host endian detection for older GCCs.
    
    Co-authored-by: John-Mark Bell <[email protected]>

diff --git a/include/nsutils/endian.h b/include/nsutils/endian.h
index 0e4bad0..a15c7e2 100644
--- a/include/nsutils/endian.h
+++ b/include/nsutils/endian.h
@@ -23,9 +23,9 @@
  */
 static inline bool endian_host_is_le(void)
 {
-       static uint32_t magic = 0x10000002;
+       const uint16_t test = 1;
 
-       return (((uint8_t *) &magic)[0] == 0x02);
+       return ((const uint8_t *) &test)[0];
 }
 
 /**


-----------------------------------------------------------------------

Summary of changes:
 include/nsutils/endian.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/nsutils/endian.h b/include/nsutils/endian.h
index 0e4bad0..a15c7e2 100644
--- a/include/nsutils/endian.h
+++ b/include/nsutils/endian.h
@@ -23,9 +23,9 @@
  */
 static inline bool endian_host_is_le(void)
 {
-       static uint32_t magic = 0x10000002;
+       const uint16_t test = 1;
 
-       return (((uint8_t *) &magic)[0] == 0x02);
+       return ((const uint8_t *) &test)[0];
 }
 
 /**


-- 
NetSurf generalised utility library
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to