TP 13 exo1: create an array in the main()
[TD_C.git] / TP_13 / exo1 / lib / array.c
index 0c56db6594ba5b9b13563048660f81431b498723..c9a824676c26d89ca5acd337742cb57e8324b9ec 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdlib.h>
 
-#include "sort.h"
+#include "array.h"
 
 int create_tab(int tab[], unsigned tab_size) {
     tab = malloc(sizeof(unsigned) * tab_size);
@@ -17,6 +17,7 @@ void free_tab(int tab[]) {
 
 /* we suppose both tab are already created */
 static void copy_tab(int src_tab[], int dest_tab[], unsigned min_tab_size, unsigned index_offset) {
+    /* FIXME: I think it's worth doing some sanity check on the array size */
     for (unsigned i = 0; i < min_tab_size; i++) {
         dest_tab[i + index_offset] = src_tab[i];
     }