mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From dc0c59d66b8679dc870c9aa568647d0be71501b7 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Borkmann <dborkman@redhat.com>
|
|
Date: Fri, 6 Dec 2013 00:33:33 +0100
|
|
Subject: [PATCH] crypto: memneq - fix for archs without efficient unaligned
|
|
access
|
|
|
|
Commit fe8c8a126806 introduced a possible build error for archs
|
|
that do not have CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS set. :/
|
|
Fix this up by bringing else braces outside of the ifdef.
|
|
|
|
Change-Id: I08195a468653062a87eaaa01031b6ee6ab8c7508
|
|
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
|
|
Fixes: fe8c8a126806 ("crypto: more robust crypto_memneq")
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Acked-By: Cesar Eduardo Barros <cesarb@cesarb.eti.br>
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
---
|
|
crypto/memneq.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/crypto/memneq.c b/crypto/memneq.c
|
|
index a285a744bc7..3cfae80ed48 100644
|
|
--- a/crypto/memneq.c
|
|
+++ b/crypto/memneq.c
|
|
@@ -109,8 +109,9 @@ static inline unsigned long __crypto_memneq_16(const void *a, const void *b)
|
|
OPTIMIZER_HIDE_VAR(neq);
|
|
neq |= *(unsigned int *)(a+12) ^ *(unsigned int *)(b+12);
|
|
OPTIMIZER_HIDE_VAR(neq);
|
|
- } else {
|
|
+ } else
|
|
#endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
|
|
+ {
|
|
neq |= *(unsigned char *)(a) ^ *(unsigned char *)(b);
|
|
OPTIMIZER_HIDE_VAR(neq);
|
|
neq |= *(unsigned char *)(a+1) ^ *(unsigned char *)(b+1);
|