TP 11 exo1: deconstify where appropriate
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 13 Mar 2017 14:06:35 +0000 (15:06 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 13 Mar 2017 14:06:35 +0000 (15:06 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TP_13/exo1/src/main.c

index 9f23749fbc3b2def57ca83457ac762d44e426e0a..41facd6323e042f6cfea518592381c27b4066826 100644 (file)
@@ -7,19 +7,19 @@
 
 int main() {
     int* tab = NULL;
-    const unsigned tab_size = 11;
+    unsigned tab_size = 11;
     tab = create_tab(tab, tab_size);
 
     printf("%d\n", tab_size);
 
     display_array(tab, tab_size);
 
-    const unsigned tab_new_size = 20;
-    tab = resize_tab(tab, tab_new_size);
+    tab_size = 20;
+    tab = resize_tab(tab, tab_size);
 
-    printf("%d\n", tab_new_size);
+    printf("%d\n", tab_size);
 
-    display_array(tab, tab_new_size);
+    display_array(tab, tab_size);
 
     free_tab(tab);
     exit(EXIT_SUCCESS);