summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-20 08:50:05 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-20 08:50:05 +0800
commitc6d5739028f2337bd0418084a319705bd5b89840 (patch)
treeeb5f04e980ed5b2d3d1c45442cb0f3ec7230e673
parente536eb906b16fb408d9480b55fd4d91d2f73c0b4 (diff)
Simplify previous commit
because only ticket list length is initialised
-rw-r--r--ticket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ticket.c b/ticket.c
index bffab9b..7b71bb7 100644
--- a/ticket.c
+++ b/ticket.c
@@ -94,8 +94,7 @@ static size_t search_callback(void *contents, size_t size, size_t nmemb
void rtclient_ticket_search(rtclient_ticketlist **listptr, const char *query)
{
*listptr = malloc(sizeof(rtclient_ticketlist));
- rtclient_ticketlist *list = *listptr;
- list->length = 0;
+ (*listptr)->length = 0;
request(search_callback, (void *)listptr, NULL, "%s%s"
, "/REST/1.0/search/ticket?query=", query);
}