Skip to content

Commit

Permalink
crypto: memneq - fix for archs without efficient unaligned access
Browse files Browse the repository at this point in the history
Commit fe8c8a1 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 <[email protected]>
Fixes: fe8c8a1 ("crypto: more robust crypto_memneq")
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-By: Cesar Eduardo Barros <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Daniel Borkmann authored and herbertx committed Dec 9, 2013
1 parent d1dd206 commit e37b94e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/memneq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e37b94e

Please sign in to comment.