From 1309b6615004bd993506f0e71333d50599220e53 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: Sun, 6 Oct 2019 20:35:26 +0800 Subject: Simplify reallocation --- search.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/search.c b/search.c index 4b8c5d0..1de25f0 100644 --- a/search.c +++ b/search.c @@ -30,10 +30,8 @@ static size_t ticket_handler(void *contents, size_t size, size_t nmemb } } while ((line = strtok(NULL, "\n"))); - rtclient_search_ticket_list *ptr = realloc(*listptr - , sizeof(rtclient_search_ticket_list) + *listptr = realloc(*listptr, sizeof(rtclient_search_ticket_list) + (*listptr)->length * sizeof(rtclient_ticket)); - *listptr = ptr; rtclient_search_ticket_list *list = *listptr; char *linesaveptr = NULL; -- cgit v1.2.3