From 0c0105c28e654289067245ecd66df59bf93e8682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Wed, 25 Sep 2019 16:31:18 +0800 Subject: Make ticket list iteration type more correct --- ticket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ticket.c b/ticket.c index c97badd..ec19d5e 100644 --- a/ticket.c +++ b/ticket.c @@ -69,7 +69,7 @@ static size_t search_callback(void *contents, size_t size, size_t nmemb line = strtok_r(lines, "\n", &linesaveptr); line = strtok_r(NULL, "\n", &linesaveptr); char *tokensaveptr = NULL, *token = NULL; - for (unsigned int i = 0; i < list->length; i++) { + for (size_t i = 0; i < list->length; i++) { list->tickets[i] = malloc(sizeof(rtclient_ticket)); rtclient_ticket *ticket = list->tickets[i]; token = strtok_r(line, ":", &tokensaveptr); @@ -105,7 +105,7 @@ void rtclient_ticket_search(rtclient_ticketlist **listptr, const char *query) void rtclient_ticket_freelist(rtclient_ticketlist *list) { - for (unsigned short i = 0; i < list->length; i++) { + for (size_t i = 0; i < list->length; i++) { rtclient_ticket *ticket = list->tickets[i]; free(ticket->subject); free(ticket); -- cgit v1.2.3