X-Git-Url: https://git.piment-noir.org/?p=TD_C.git;a=blobdiff_plain;f=TP_13%2Fexo1%2Flib%2Farray.c;h=c9a824676c26d89ca5acd337742cb57e8324b9ec;hp=0c56db6594ba5b9b13563048660f81431b498723;hb=884e95575f85cb863b53910d203759a5cfc68d81;hpb=e40016767464ae5f361e1be20a9bbc6858878e5e diff --git a/TP_13/exo1/lib/array.c b/TP_13/exo1/lib/array.c index 0c56db6..c9a8246 100644 --- a/TP_13/exo1/lib/array.c +++ b/TP_13/exo1/lib/array.c @@ -1,6 +1,6 @@ #include -#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]; }