Commit 07b336ce authored by A. Wilcox's avatar A. Wilcox

Etsy: Eliminate waste from calloc statement in connect_to.

parent bc483fc4
......@@ -1731,7 +1731,7 @@ bool EtsySite::connect_to(const char *url, bool needs_auth)
{
url_len += 33;
}
char *fullurl = static_cast<char *>(calloc(url_len, sizeof(fullurl)));
char *fullurl = static_cast<char *>(calloc(url_len, sizeof(char)));
if(fullurl == NULL) alloc_error("endpoint URL buffer", url_len);
char sep = (strchr(url, static_cast<int>('?')) ? '&' : '?');
snprintf(fullurl, url_len, "http://openapi.etsy.com/v2/%s%c%s", url, (needs_auth ? '\0' : sep), (needs_auth ? "" : "api_key=phn47dnkxzar8jw8s9u4jkfz"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment