From 65544a820bed85dd28908966d9b25bb3a934f114 Mon Sep 17 00:00:00 2001 From: Jerome Benoit Date: Fri, 3 Mar 2017 23:58:02 +0100 Subject: [PATCH] TP 9 exo2: correct some types mismatching. Signed-off-by: Jerome Benoit --- TP_9/exo2/clist.c | 4 ++-- TP_9/exo2/exo2.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TP_9/exo2/clist.c b/TP_9/exo2/clist.c index 4812ab8..1ca2fc5 100644 --- a/TP_9/exo2/clist.c +++ b/TP_9/exo2/clist.c @@ -119,7 +119,7 @@ link_t* list_sort(link_t* head) { } unsigned list_count(link_t* head) { - int count = 0; + unsigned count = 0; while (head != NULL) { ++count; @@ -163,7 +163,7 @@ void list_clear(link_t* head) { } void list_display_values(link_t* head) { - int i = 0; + unsigned i = 0; printf("------Begin------\n"); while (head != NULL) { diff --git a/TP_9/exo2/exo2.c b/TP_9/exo2/exo2.c index 09855d5..b06d7a4 100644 --- a/TP_9/exo2/exo2.c +++ b/TP_9/exo2/exo2.c @@ -35,6 +35,8 @@ int main() { list_display_values(head2); head = list_concat(head1, head2); list_display_values(head); + head = list_sort(head); + list_display_values(head); //list_clear(head1); //list_clear(head2); list_clear(head); -- 2.34.1