summaryrefslogtreecommitdiff
path: root/siphash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-30 04:28:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-30 04:28:15 +0000
commit59ed302965c5e38526ad33b13d8361859c5e7726 (patch)
tree3d1f275f833828c32a7d95661812bef223266d87 /siphash.c
parentdacc2c24363dbaaf58cc246e0ae1b8fa643b213e (diff)
siphash.c: fix missing condition
* siphash.c (sip_hash24): fix for aligned word access little endian platforms. [ruby-core:58658] [Bug #9172] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'siphash.c')
-rw-r--r--siphash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/siphash.c b/siphash.c
index 2018ade431..cd8ba624bd 100644
--- a/siphash.c
+++ b/siphash.c
@@ -417,7 +417,7 @@ sip_hash24(const uint8_t key[16], const uint8_t *data, size_t len)
SIP_2_ROUND(m, v0, v1, v2, v3);
}
}
-#elif BYTE_ORDER == BIG_ENDIAN
+#else
for (; data != end; data += sizeof(uint64_t)) {
m = U8TO64_LE(data);
SIP_2_ROUND(m, v0, v1, v2, v3);
@@ -453,7 +453,7 @@ sip_hash24(const uint8_t key[16], const uint8_t *data, size_t len)
last.lo |= ((uint32_t *) end)[0];
#endif
break;
-#elif BYTE_ORDER == BIG_ENDIAN
+#else
OR_BYTE(3);
#endif
case 3: