summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-02-21 09:31:21 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-02-21 09:33:58 +0200
commitc054fbc11e9beca0d45285c3e1f448c81416c5ce (patch)
tree8884f1f2de291958f9c64d4536e052898ce2cded /src/blob.c
parent271047cc930150a2972573625124b0c097ad322a (diff)
downloadapk-tools-c054fbc11e9beca0d45285c3e1f448c81416c5ce.tar.gz
apk-tools-c054fbc11e9beca0d45285c3e1f448c81416c5ce.tar.bz2
apk-tools-c054fbc11e9beca0d45285c3e1f448c81416c5ce.tar.xz
apk-tools-c054fbc11e9beca0d45285c3e1f448c81416c5ce.zip
db: fix unaligned memory access in csum_hash()
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/blob.c b/src/blob.c
index 38e370c..69d6d0e 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -204,16 +204,6 @@ static inline uint32_t rotl32(uint32_t x, int8_t r)
return (x << r) | (x >> (32 - r));
}
-static inline uint32_t get_unaligned32(const void *ptr)
-{
-#if defined(__x86_64__) || defined(__i386__)
- return *(const uint32_t *)ptr;
-#else
- const uint8_t *p = ptr;
- return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
-#endif
-}
-
static uint32_t murmur3_32(const void *pkey, uint32_t len, uint32_t seed)
{
static const uint32_t c1 = 0xcc9e2d51;