boot/loader: Fix the 'crc' command to the intended code.
authorSascha Wildner <saw@online.de>
Tue, 19 Sep 2017 18:24:03 +0000 (20:24 +0200)
committerSascha Wildner <saw@online.de>
Tue, 19 Sep 2017 18:24:03 +0000 (20:24 +0200)
It doesn't change the result, but fixes a cppcheck warning.

Reported-by: dcb
Fix-submitted-by: Lubos Boucek
Dragonfly-bug:    <https://bugs.dragonflybsd.org/issues/3060>

sys/boot/common/module.c

index 449e64d..24ff89e 100644 (file)
@@ -251,7 +251,7 @@ command_crc(int argc, char *argv[])
                                name, strerror(errno));
                        break;
                }
-               if (got == 0)
+               if (crc == 0)
                        crc = iscsi_crc32(buf, got);
                else
                        crc = iscsi_crc32_ext(buf, got, crc);