diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-16 10:44:12 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-16 10:44:12 +0800 |
commit | 7e15b32baaf737d28e0086b516b9ed307ab3f0c5 (patch) | |
tree | f8821ea48a84bdadeec39873e61bb10a81347d98 /shipping.h | |
parent | 1c51604909c9953acd874e24abe90ba565c650d2 (diff) |
No need for shipping to be passed as pointer
when it needs to be global anyway.
Diffstat (limited to 'shipping.h')
-rw-r--r-- | shipping.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,18 +2,18 @@ #include <curl/curl.h> #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); } } |