summaryrefslogtreecommitdiff
path: root/pikul.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-29 09:45:45 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-29 09:45:45 +0800
commit5b2d7b0e4a49cc46a31ba12215fcb2a1691a49fe (patch)
tree1e2633846b159ee1816d95968b633f18cc37d8fe /pikul.c
parent425fcf9ada0b29357af74b8308929f68076ac720 (diff)
Change the weight to long grams
Diffstat (limited to 'pikul.c')
-rw-r--r--pikul.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pikul.c b/pikul.c
index 06c2ef2..e725deb 100644
--- a/pikul.c
+++ b/pikul.c
@@ -292,7 +292,7 @@ static inline long crop_limit(size_t len, char *offset)
return strtol(str, NULL, 10);
}
-char *pikul_shopify(char *origins[], char *destinations[], double weight)
+const char *pikul_shopify(char *origins[], char *destinations[], long grams)
{
struct pikul_service **services[PIKUL_END];
for (enum pikul_company company = PIKUL; company < PIKUL_END;
@@ -302,7 +302,7 @@ char *pikul_shopify(char *origins[], char *destinations[], double weight)
continue;
}
services[company] = pikul_services(company, origins[company],
- destinations[company], (double)(weight / 1000));
+ destinations[company], (double)(grams / 1000));
}
static const char *prefix = "{\"rates\":[";
const size_t prefix_len = strlen(prefix);