a few calloc checks, still many to go

This commit is contained in:
Philippe Teuwen committed 2025-03-24 11:17:40 +01:00
1 parent 74c60301d1
commit c37ca881e6
12 files changed
+84 -1

No files matched your search

@@ -203,6 +203,10 @@ static void write_bitflips_file(odd_even_t odd_even, uint16_t bitflip, int sum_a
char filename[80];
snprintf(filename, sizeof(filename), "bitflip_%d_%03" PRIx16 "_sum%d_states.bin", odd_even, bitflip, sum_a0);
FILE *outfile = fopen(filename, "wb");
if (outfile == NULL) {
perror("Error opening file");
exit(4);
}
fwrite(&count, 1, sizeof(count), outfile);
fwrite(bitset, 1, sizeof(uint32_t) * (1 << 19), outfile);
fclose(outfile);