]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/crc32c.cc: reduce scope of variable
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 14 May 2018 20:56:10 +0000 (22:56 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Jun 2018 12:17:19 +0000 (14:17 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/common/crc32c.cc

index a30d386641364bbc4b7f2f2d5d428f24172f366d..d5c984ab463e24fafe468e0b861710a411d28156 100644 (file)
@@ -218,8 +218,8 @@ uint32_t ceph_crc32c_zeros(uint32_t crc, unsigned len)
   len = len >> 4;
   range = 4;
   while (len != 0) {
-    uint32_t crc1 = 0;
     if ((len & 1) == 1) {
+      uint32_t crc1 = 0;
       uint32_t* ptr = crc_turbo_table/*.val*/[range];
       while (crc != 0) {
         uint32_t mask = ~((crc & 1) - 1);