}
void free_tab(int tab[]) {
- free(tab);
+ if (!tab)
+ free(tab);
}
/* we suppose both tabs are already created */
/* FIXME: I think it's worth doing some sanity checks on the array size:
* dest_tab_size >= src_tab_size */
if (src_tab == NULL || dest_tab == NULL) {
- printf("please ensure you have created both arrays beforehand\n");
+ printf("Please ensure you have created both arrays beforehand\n");
return;
}
for (unsigned i = 0; i < src_tab_size; i++) {