|
@@ -29,14 +29,7 @@
|
|
|
#include <stdio.h>
|
|
|
#include <string.h>
|
|
|
#include <inttypes.h>
|
|
|
-
|
|
|
-static uint32_t getle32(const void *p)
|
|
|
-{
|
|
|
- const uint8_t *cp = p;
|
|
|
-
|
|
|
- return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
|
|
|
- ((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
|
|
|
-}
|
|
|
+#include <tools/le_byteshift.h>
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
{
|
|
@@ -69,7 +62,7 @@ int main(int argc, char *argv[])
|
|
|
}
|
|
|
|
|
|
ilen = ftell(f);
|
|
|
- olen = getle32(&olen);
|
|
|
+ olen = get_unaligned_le32(&olen);
|
|
|
fclose(f);
|
|
|
|
|
|
/*
|