src: stop overriding system printf symbols

Also:
- tool_operate: use the socket printf mask, drop cast.

Follow-up to 4deea9396b #18814

Closes #18844
This commit is contained in:
Viktor Szakats 2025-10-04 12:24:57 +02:00
parent 34ad78da89
commit db98daab05
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
25 changed files with 203 additions and 207 deletions

View file

@ -76,14 +76,14 @@ static char *ipfs_gateway(void)
if(!ipfs_path) {
char *home = getenv("HOME");
if(home && *home)
ipfs_path = aprintf("%s/.ipfs/", home);
ipfs_path = curl_maprintf("%s/.ipfs/", home);
/* fallback to "~/.ipfs", as that is the default location. */
}
if(!ipfs_path || ensure_trailing_slash(&ipfs_path))
goto fail;
gateway_composed_file_path = aprintf("%sgateway", ipfs_path);
gateway_composed_file_path = curl_maprintf("%sgateway", ipfs_path);
if(!gateway_composed_file_path)
goto fail;
@ -233,8 +233,8 @@ CURLcode ipfs_url_rewrite(CURLU *uh, const char *protocol, char **url,
/* ensure the gateway path ends with a trailing slash */
ensure_trailing_slash(&gwpath);
pathbuffer = aprintf("%s%s/%s%s", gwpath, protocol, cid,
inputpath ? inputpath : "");
pathbuffer = curl_maprintf("%s%s/%s%s", gwpath, protocol, cid,
inputpath ? inputpath : "");
if(!pathbuffer) {
goto clean;
}