From bd5fbe451e860dc6d8c5b9eca1eb0919d050e465 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 2 Mar 2006 14:21:51 +0000 Subject: [PATCH] Be slighly more consistent about temporaries. --- hamming32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hamming32.c b/hamming32.c index 6cbd153..fb53e3b 100644 --- a/hamming32.c +++ b/hamming32.c @@ -44,10 +44,8 @@ unsigned make_codeword(unsigned data) /* can detect all single or double bit errors */ int has_error(unsigned code) { - unsigned data = code >> PARITY_BITS; unsigned parity = code & ((1 << PARITY_BITS) - 1); - - return (generate_parity(data) != parity); + return (generate_parity(code >> PARITY_BITS) != parity); } int has_double_error(unsigned code) -- 2.39.2