From 02ac0da7e93b9ac19f8c7cf9a84558b192375754 Mon Sep 17 00:00:00 2001 From: ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ Date: Thu, 22 Sep 2022 21:53:37 +0800 Subject: Reuse api_key_len --- shopify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shopify.c b/shopify.c index 469a0b6..6c5175f 100644 --- a/shopify.c +++ b/shopify.c @@ -411,7 +411,7 @@ static enum MHD_Result handle_request(void *cls, struct MHD_Connection *con, curl_easy_setopt(curl, CURLOPT_URL, url); static const char *post_tmpl = "client_id=%s&client_secret=%s&code=%s"; - char post[strlen(post_tmpl) - strlen("%s") * 3 + strlen(api_key) + char post[strlen(post_tmpl) - strlen("%s") * 3 + api_key_len + api_secret_key_len + strlen(code) + 1]; sprintf(post, post_tmpl, api_key, api_secret_key, code); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post); -- cgit v1.3