Skip to content

Commit

Permalink
crypto: fcrypt - Remove 'do while(0)' loop for single statement macro
Browse files Browse the repository at this point in the history
Remove the 'do while(0)' loop in the macro, as it is not needed for single
statement macros. Condense into one line.

Signed-off-by: Milan Djurovic <mdjurovic@zohomail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Milan Djurovic authored and herbertx committed Apr 2, 2021
1 parent c29da97 commit 5c083eb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crypto/fcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ do { \
} while (0)

/* Rotate right one 64 bit number as a 56 bit number */
#define ror56_64(k, n) \
do { \
k = (k >> n) | ((k & ((1 << n) - 1)) << (56 - n)); \
} while (0)
#define ror56_64(k, n) (k = (k >> n) | ((k & ((1 << n) - 1)) << (56 - n)))

/*
* Sboxes for Feistel network derived from
Expand Down

0 comments on commit 5c083eb

Please sign in to comment.