}
}
fclose(out);
- restcount--;
printHumanReadSize(output, splitgroesse);
- if(restcount > 0)
+ if(restcount > 0) {
memcpy(input, rest, length * sizeof(struct file_size));
+ input = (struct file_size *)
+ realloc(input, restcount * sizeof(struct file_size));
+ }
free(rest);
+ restcount--;
return restcount;
}
while(s_length > 0) {
sprintf(outname, "%s%03d", output, num++);
s_length = splitter(fs, outname, split, s_length);
- fs = (struct file_size *)
- realloc(fs, s_length * sizeof(struct file_size));
}
free(fs);