mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
lib: stop overriding system printf symbols
After this patch, the codebase no longer overrides system printf functions. Instead it explicitly calls either the curl printf functions `curl_m*printf()` or the system ones using their original names. Also: - drop unused `curl_printf.h` includes. - checksrc: ban system printf functions, allow where necessary. Follow-up todb98daab05#18844 Follow-up to4deea9396b#18814 Closes #18866
This commit is contained in:
parent
13f10add17
commit
b12da22db1
147 changed files with 1030 additions and 1145 deletions
|
|
@ -42,8 +42,7 @@
|
|||
#include "curlx/fopen.h"
|
||||
#include "curlx/strparse.h"
|
||||
|
||||
/* The last 3 #include files should be in this order */
|
||||
#include "curl_printf.h"
|
||||
/* The last 2 #include files should be in this order */
|
||||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
|
|
@ -437,7 +436,7 @@ NETRCcode Curl_parsenetrc(struct store_netrc *store, const char *host,
|
|||
return NETRC_FILE_MISSING; /* no home directory found (or possibly out
|
||||
of memory) */
|
||||
|
||||
filealloc = aprintf("%s%s.netrc", home, DIR_CHAR);
|
||||
filealloc = curl_maprintf("%s%s.netrc", home, DIR_CHAR);
|
||||
if(!filealloc) {
|
||||
free(homea);
|
||||
return NETRC_OUT_OF_MEMORY;
|
||||
|
|
@ -448,7 +447,7 @@ NETRCcode Curl_parsenetrc(struct store_netrc *store, const char *host,
|
|||
#ifdef _WIN32
|
||||
if(retcode == NETRC_FILE_MISSING) {
|
||||
/* fallback to the old-style "_netrc" file */
|
||||
filealloc = aprintf("%s%s_netrc", home, DIR_CHAR);
|
||||
filealloc = curl_maprintf("%s%s_netrc", home, DIR_CHAR);
|
||||
if(!filealloc) {
|
||||
free(homea);
|
||||
return NETRC_OUT_OF_MEMORY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue