repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 1022d751617a80dfd2308450557b2c64c333946b: path_to: revision_to:
commit 1022d751617a80dfd2308450557b2c64c333946b Author: Marc LehmannDate: Mon Jan 3 18:42:58 2011 +0000 fix alignment, as pointed out by exg diff --git a/src/rxvtutil.h b/src/rxvtutil.h
--- a/src/rxvtutil.h
+++ b/src/rxvtutil.h
@@ -44,16 +44,16 @@ using namespace std;
#endif
namespace byteorder {
- static uint32_t e ()
+ static unsigned char e ()
{
- char c [4] = { 0x11, 0x22, 0x33, 0x44 };
- return *(uint32_t *)c;
+ const uint32_t u = 0x11223344;
+ return *(unsigned char *)u;
}
- static bool big_endian () { return e () == 0x11223344; };
- static bool network () { return big_endian (); };
- static bool little_endian () { return e () == 0x44332211; };
- static bool vax () { return little_endian (); };
+ static bool big_endian () { return e () == 0x11; };
+ static bool network () { return big_endian (); };
+ static bool little_endian () { return e () == 0x44; };
+ static bool vax () { return little_endian (); };
};
// various utility functions
-----END OF PAGE-----