From a2df8ea599714237567b2cfd81da1b6c52d4ed6a Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Mon, 7 Dec 2015 15:29:43 -0800 Subject: [PATCH] Simplify excessively idiomatic C-ism. --- firmware/common/crc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/common/crc.hpp b/firmware/common/crc.hpp index 0b825dc2..ded1934a 100644 --- a/firmware/common/crc.hpp +++ b/firmware/common/crc.hpp @@ -59,7 +59,7 @@ public: */ T remainder = crc_in; remainder ^= data << (width() - 8); - for(size_t bit=8; bit>0; --bit) { + for(size_t bit=0; bit<8; bit++) { if( remainder & top_bit() ) { remainder = (remainder << 1) ^ polynomial; } else {