提交 e37b94eb 编写于 作者: D Daniel Borkmann 提交者: Herbert Xu

crypto: memneq - fix for archs without efficient unaligned access

Commit fe8c8a12 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: NFengguang Wu <fengguang.wu@intel.com>
Fixes: fe8c8a12 ("crypto: more robust crypto_memneq")
Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
Acked-By: NCesar Eduardo Barros <cesarb@cesarb.eti.br>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 d1dd206c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册