1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-11-08 18:02:23 +05:30

fwrite_le.c: reformat

This commit is contained in:
Intel A80486DX2-66 2024-03-10 16:20:25 +03:00
parent d1a6bb91fa
commit 282670f23f
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -11,15 +11,15 @@ int detect_endianness(void) {
volatile uint32_t i = 0x01234567;
uint8_t* bytes = (uint8_t*)(&i);
if (bytes[0] == 0x01 &&
bytes[1] == 0x23 &&
bytes[2] == 0x45 &&
bytes[3] == 0x67)
bytes[1] == 0x23 &&
bytes[2] == 0x45 &&
bytes[3] == 0x67)
return DETECTED_BIG_ENDIAN;
else if (
bytes[0] == 0x67 &&
bytes[1] == 0x45 &&
bytes[2] == 0x23 &&
bytes[3] == 0x01)
bytes[0] == 0x67 &&
bytes[1] == 0x45 &&
bytes[2] == 0x23 &&
bytes[3] == 0x01)
return DETECTED_LITTLE_ENDIAN;
return UNSUPPORTED_ENDIANNESS;
}