aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/memneq.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-12-05 18:33:33 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2013-12-09 07:09:12 -0500
commite37b94ebffdd93d121e5308eb93e2e55a0893fbb (patch)
treeb4766180285e47231c602c403c5002d19e2adda6 /crypto/memneq.c
parentd1dd206c2abf678889445e63ecc949e9274f5806 (diff)
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. 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>
Diffstat (limited to 'crypto/memneq.c')
-rw-r--r--crypto/memneq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/memneq.c b/crypto/memneq.c
index 570f6f3401ce..afed1bd16aee 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)
108 OPTIMIZER_HIDE_VAR(neq); 108 OPTIMIZER_HIDE_VAR(neq);
109 neq |= *(unsigned int *)(a+12) ^ *(unsigned int *)(b+12); 109 neq |= *(unsigned int *)(a+12) ^ *(unsigned int *)(b+12);
110 OPTIMIZER_HIDE_VAR(neq); 110 OPTIMIZER_HIDE_VAR(neq);
111 } else { 111 } else
112#endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */ 112#endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
113 {
113 neq |= *(unsigned char *)(a) ^ *(unsigned char *)(b); 114 neq |= *(unsigned char *)(a) ^ *(unsigned char *)(b);
114 OPTIMIZER_HIDE_VAR(neq); 115 OPTIMIZER_HIDE_VAR(neq);
115 neq |= *(unsigned char *)(a+1) ^ *(unsigned char *)(b+1); 116 neq |= *(unsigned char *)(a+1) ^ *(unsigned char *)(b+1);