I have the following line of code, which snippet correctly uses realloc?
I have a suspicioun that the realloc call in *delete_choices line is incorrectly used is this correct?
*delete_choices = (char*)malloc(files_max);
if (files_size >= files_max)
{
files_max *= 2;
files = (struct dirent*)realloc(files, sizeof(struct dirent) * files_max);
*delete_choices = (char*)realloc(delete_choices, files_max);
}
Is this the correct usage?
*delete_choices = (char*)realloc(*delete_choices, files_max);
Really confused about this