From: Jérôme Benoit Date: Tue, 28 Feb 2017 14:14:36 +0000 (+0100) Subject: Fix a mismatching type comparison. X-Git-Url: https://git.piment-noir.org/?p=TD_C.git;a=commitdiff_plain;h=913777a2bfd77759b7da95a3b5ab07b5d6cdf8fc Fix a mismatching type comparison. Signed-off-by: Jérôme Benoit --- diff --git a/TP_8/exo3/exo3.c b/TP_8/exo3/exo3.c index 18b0651..6c2d6c5 100644 --- a/TP_8/exo3/exo3.c +++ b/TP_8/exo3/exo3.c @@ -45,7 +45,7 @@ unsigned list_count(link_t* head) { int list_get(link_t* head, unsigned index) { if (index < list_count(head)) { - for (int i = 0; i < index; i++) { + for (unsigned i = 0; i < index; i++) { head = head->next; } return head->value;