Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c78bc17 authored by Alexander Kuleshov's avatar Alexander Kuleshov Committed by Linus Torvalds
Browse files

lib/halfmd4.c: use rol32 inline function in the ROUND macro



<linux/bitops.h> provides rol32() inline function, let's use already
predefined function instead of direct expression.

Signed-off-by: default avatarAlexander Kuleshov <kuleshovmail@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 78e3c795
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
#include <linux/compiler.h>
#include <linux/export.h>
#include <linux/cryptohash.h>
#include <linux/bitops.h>

/* F, G and H are basic MD4 functions: selection, majority, parity */
#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
@@ -14,7 +15,7 @@
 * Rotation is separate from addition to prevent recomputation
 */
#define ROUND(f, a, b, c, d, x, s)	\
	(a += f(b, c, d) + x, a = (a << s) | (a >> (32 - s)))
	(a += f(b, c, d) + x, a = rol32(a, s))
#define K1 0
#define K2 013240474631UL
#define K3 015666365641UL