From f686ef14951df5f4c2a82bc6075bfd520e05c3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 22 Jul 2021 17:04:07 +0800 Subject: pikul_codes shouldn't be needed --- pikul.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'pikul.c') diff --git a/pikul.c b/pikul.c index 0a170b7..27c4cde 100644 --- a/pikul.c +++ b/pikul.c @@ -227,21 +227,6 @@ char *pikul_html(const char *origin, const char *destination, double weight, return html; } -char **pikul_codes(const char *origin, const char *destination, double weight) -{ - char **codes = malloc(sizeof(char *)); - codes[0] = NULL; - struct pikul_services *services = pikul_services(origin, destination, weight); - if (!services || !services->length) - return codes; - codes = realloc(codes, (services->length + 1) * sizeof(char *)); - size_t i = 0; - for (i = 0; i < services->length; i++) - codes[i] = services->list[i]->code; - codes[i] = NULL; - return codes; -} - double pikul_cost(const char *origin, const char *destination, double weight, const char *code) { struct pikul_services *services = pikul_services(origin, destination, weight); -- cgit v1.2.3