diff options
-rw-r--r-- | crypto/lrw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c index 9d52e580d10a..8ef664e3bcd9 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c | |||
@@ -91,8 +91,9 @@ struct sinfo { | |||
91 | 91 | ||
92 | static inline void inc(be128 *iv) | 92 | static inline void inc(be128 *iv) |
93 | { | 93 | { |
94 | if (!(iv->b = cpu_to_be64(be64_to_cpu(iv->b) + 1))) | 94 | be64_add_cpu(&iv->b, 1); |
95 | iv->a = cpu_to_be64(be64_to_cpu(iv->a) + 1); | 95 | if (!iv->b) |
96 | be64_add_cpu(&iv->a, 1); | ||
96 | } | 97 | } |
97 | 98 | ||
98 | static inline void lrw_round(struct sinfo *s, void *dst, const void *src) | 99 | static inline void lrw_round(struct sinfo *s, void *dst, const void *src) |