summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--anteraja.c9
-rw-r--r--pikul.c2
-rw-r--r--shipping.h2
3 files changed, 5 insertions, 8 deletions
diff --git a/anteraja.c b/anteraja.c
index 1268820..b903548 100644
--- a/anteraja.c
+++ b/anteraja.c
@@ -3,18 +3,15 @@
extern CURL *curl;
-static const char *status_trail[] = {
- "status",
- NULL
-};
+static const char *status_trail[] = { "status", NULL };
void anteraja_init(char *provisions[], struct shipping *shipping)
{
enum { BASE_PATH, ACCESS_KEY };
shipping->base = malloc(strlen(provisions[BASE_PATH]) + 1);
strcpy(shipping->base, provisions[BASE_PATH]);
- headers(shipping, (const char *[]){ "access-key-id", "secret-access-key", NULL },
- &provisions[ACCESS_KEY]);
+ headers((const char *[]){ "access-key-id", "secret-access-key", NULL },
+ &provisions[ACCESS_KEY], shipping);
shipping->headers = curl_slist_append(shipping->headers, "Content-Type:application/json");
}
diff --git a/pikul.c b/pikul.c
index 1c03170..e187113 100644
--- a/pikul.c
+++ b/pikul.c
@@ -5,7 +5,7 @@ CURL *curl;
json_tokener *tokener;
static struct shipping shipping;
-extern inline void headers(struct shipping *shipping, const char *fields[], char *provisions[]);
+extern inline void headers(const char *[], char *[], struct shipping *);
extern inline void handle_services(const char *, size_t, const char *[], const char *[], const char *[],
struct pikul_services **);
diff --git a/shipping.h b/shipping.h
index dc7d7df..e1c5ba5 100644
--- a/shipping.h
+++ b/shipping.h
@@ -8,7 +8,7 @@ struct shipping {
struct curl_slist *headers;
};
-inline void headers(struct shipping *shipping, const char *fields[], char *provisions[])
+inline void headers(const char *fields[], char *provisions[], struct shipping *shipping)
{
shipping->headers = NULL;
while (*fields) {