diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-29 09:05:20 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-29 09:05:20 +0800 |
commit | 739bcbbd83115cb8cf3f5b60fd7e73056a0c7293 (patch) | |
tree | aacd2f6c5270963728ff2dd72e4923ae7472acfd | |
parent | 0aff874caec82d8188057d9566e1292678d7a78b (diff) |
Correct type sizing
-rw-r--r-- | ticket.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -61,10 +61,12 @@ static size_t search_callback(void *contents, size_t size, size_t nmemb return realsize; } } while ((line = strtok(NULL, "\n"))); + rtclient_ticketlist *ptr = realloc(*listptr, sizeof(*listptr) - + (*listptr)->length * sizeof(char *)); + + (*listptr)->length * sizeof(rtclient_ticket)); *listptr = ptr; rtclient_ticketlist *list = *listptr; + char *linesaveptr = NULL; line = strtok_r(lines, "\n", &linesaveptr); line = strtok_r(NULL, "\n", &linesaveptr); |