Introduce nalloc_nofail

This commit is contained in:
Andrea Mazzoleni 2026-07-06 18:38:50 +02:00
parent b297cbfa9b
commit db3f5af65a
12 changed files with 43 additions and 39 deletions

View file

@ -975,8 +975,8 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
memset(buffer[buffermax - 1], 0, state->block_size);
raid_zero(buffer[buffermax - 1]);
failed = malloc_nofail(diskmax * sizeof(struct failed_struct));
failed_map = malloc_nofail(diskmax * sizeof(unsigned));
failed = nalloc_nofail(diskmax, sizeof(struct failed_struct));
failed_map = nalloc_nofail(diskmax, sizeof(unsigned));
soft_error = 0;
io_error = 0;