X-Git-Url: https://git.ao2.it/kinect-audio-setup.git/blobdiff_plain/f9427c75a57d01f791770aa6bfc2a094c1eaf371..a270d216897b066ea432d6e122e3a349713d4673:/kinect_upload_fw/endian.c diff --git a/kinect_upload_fw/endian.c b/kinect_upload_fw/endian.c index 89120ca..24c5ccf 100644 --- a/kinect_upload_fw/endian.c +++ b/kinect_upload_fw/endian.c @@ -1,16 +1,12 @@ #include #include -static int litend(void) { +static int little_endian(void) { int i = 0; ((char *) (&i))[0] = 1; return (i == 1); } -static int bigend(void) { - return !litend(); -} - int main(void) { printf("#ifndef __ENDIAN_H\n"); printf("#define __ENDIAN_H\n"); @@ -18,7 +14,7 @@ int main(void) { printf("#define __LITTLE_ENDIAN 1234\n"); printf("#define __BIG_ENDIAN 4321\n"); printf("#define __BYTE_ORDER __%s_ENDIAN\n", - litend() ? "LITTLE" : "BIG"); + little_endian() ? "LITTLE" : "BIG"); printf("\n"); printf("#endif /* __ENDIAN_H */\n"); exit(0);