Update ipod_touch_sha1.c
fix swapLong argument
This commit is contained in:
1 parent
cae1b51a78
commit
4400b861c8
1 file changed
+2
-3
@@ -1,7 +1,6 @@
|
|||||||
#include "hw/arm/ipod_touch_sha1.h"
|
#include "hw/arm/ipod_touch_sha1.h"
|
||||||
|
|
||||||
static uint64_t swapLong(void *X) {
|
static uint64_t swapLong(uint64_t x) {
|
||||||
uint64_t x = (uint64_t) X;
|
|
||||||
x = (x & 0x00000000FFFFFFFF) << 32 | (x & 0xFFFFFFFF00000000) >> 32;
|
x = (x & 0x00000000FFFFFFFF) << 32 | (x & 0xFFFFFFFF00000000) >> 32;
|
||||||
x = (x & 0x0000FFFF0000FFFF) << 16 | (x & 0xFFFF0000FFFF0000) >> 16;
|
x = (x & 0x0000FFFF0000FFFF) << 16 | (x & 0xFFFF0000FFFF0000) >> 16;
|
||||||
x = (x & 0x00FF00FF00FF00FF) << 8 | (x & 0xFF00FF00FF00FF00) >> 8;
|
x = (x & 0x00FF00FF00FF00FF) << 8 | (x & 0xFF00FF00FF00FF00) >> 8;
|
||||||
@@ -150,4 +149,4 @@ static void ipod_touch_machine_types(void)
|
|||||||
type_register_static(&ipod_touch_sha1_info);
|
type_register_static(&ipod_touch_sha1_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
type_init(ipod_touch_machine_types)
|
type_init(ipod_touch_machine_types)
|
||||||
Reference in new issue
Block a user