summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-12-06 00:33:33 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2013-12-09 20:09:12 +0800
commitcbab377a633a32bcb18d3cee2905ab720e7e921f (patch)
tree726fa0fc4823717c31034c9920c8a21126b0b843
parent0a7be0a5838101af7d24f47c715ed353341e88bf (diff)
downloadlinux-crypto-cbab377a633a32bcb18d3cee2905ab720e7e921f.tar.gz
linux-crypto-cbab377a633a32bcb18d3cee2905ab720e7e921f.zip
crypto: memneq - fix for archs without efficient unaligned access
Commit 899635655e97 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. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Fixes: 899635655e97 ("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>
-rw-r--r--crypto/memneq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/memneq.c b/crypto/memneq.c
index 570f6f34..afed1bd1 100644
--- a/crypto/memneq.c
+++ b/crypto/memneq.c
@@ -108,8 +108,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);