From 7e15b32baaf737d28e0086b516b9ed307ab3f0c5 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: Fri, 16 Jul 2021 10:44:12 +0800 Subject: No need for shipping to be passed as pointer when it needs to be global anyway. --- shipping.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'shipping.h') diff --git a/shipping.h b/shipping.h index e1c5ba5..37ac20f 100644 --- a/shipping.h +++ b/shipping.h @@ -2,18 +2,18 @@ #include #include "pikul.h" -struct shipping { +extern struct shipping { enum pikul_company company; char *base; struct curl_slist *headers; -}; +} shipping; -inline void headers(const char *fields[], char *provisions[], struct shipping *shipping) +inline void headers(const char *fields[], char *provisions[]) { - shipping->headers = NULL; + shipping.headers = NULL; while (*fields) { char header[strlen(*fields) + strlen(*provisions) + 2]; sprintf(header, "%s:%s", *fields++, *provisions++); - shipping->headers = curl_slist_append(shipping->headers, header); + shipping.headers = curl_slist_append(shipping.headers, header); } } -- cgit v1.2.3