t/zbd: avoid test case 31 failure with small devices
[fio.git] / t / lfsr-test.c
index 279e07f0ecd05110fae4e78e12787b8d7788fc27..632de38313401a468bddd0bf27476f8455297ef8 100644 (file)
@@ -41,11 +41,11 @@ int main(int argc, char *argv[])
        switch (argc) {
                case 5: if (strncmp(argv[4], "verify", 7) == 0)
                                verify = 1;
-                       fallthrough;
+                       fio_fallthrough;
                case 4: spin = atoi(argv[3]);
-                       fallthrough;
+                       fio_fallthrough;
                case 3: seed = atol(argv[2]);
-                       fallthrough;
+                       fio_fallthrough;
                case 2: numbers = strtol(argv[1], NULL, 16);
                                break;
                default: usage();
@@ -78,8 +78,7 @@ int main(int argc, char *argv[])
        /* Create verification table */
        if (verify) {
                v_size = numbers * sizeof(uint8_t);
-               v = malloc(v_size);
-               memset(v, 0, v_size);
+               v = calloc(1, v_size);
                printf("\nVerification table is %lf KiB\n", (double)(v_size) / 1024);
        }
        v_start = v;