mirror of
https://github.com/curl/curl.git
synced 2026-08-25 09:03:32 +03:00
lib, src: delete stray curl_ prefix from printf calls
Also: - unit1398: delete redundant `curl/mprintf.h` include. Closes #14664
This commit is contained in:
parent
8b09138083
commit
573e7e827e
9 changed files with 62 additions and 64 deletions
|
|
@ -96,7 +96,7 @@ bool tool_create_output_file(struct OutStruct *outs,
|
|||
(errno == EEXIST || errno == EISDIR) &&
|
||||
/* because we keep having files that already exist */
|
||||
next_num < 100 /* and we have not reached the retry limit */ ) {
|
||||
curl_msnprintf(newname + len + 1, 12, "%d", next_num);
|
||||
msnprintf(newname + len + 1, 12, "%d", next_num);
|
||||
next_num++;
|
||||
do {
|
||||
fd = open(newname, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, OPENMODE);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ CURLcode easysrc_addf(struct slist_wc **plist, const char *fmt, ...)
|
|||
char *bufp;
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
bufp = curl_mvaprintf(fmt, ap);
|
||||
bufp = vaprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
if(!bufp) {
|
||||
ret = CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <curl/mprintf.h>
|
||||
#include <curlx.h>
|
||||
|
||||
#include "tool_findfile.h"
|
||||
|
||||
|
|
@ -72,9 +72,9 @@ static char *checkhome(const char *home, const char *fname, bool dotscore)
|
|||
for(i = 0; i < (dotscore ? 2 : 1); i++) {
|
||||
char *c;
|
||||
if(dotscore)
|
||||
c = curl_maprintf("%s" DIR_CHAR "%c%s", home, pref[i], &fname[1]);
|
||||
c = aprintf("%s" DIR_CHAR "%c%s", home, pref[i], &fname[1]);
|
||||
else
|
||||
c = curl_maprintf("%s" DIR_CHAR "%s", home, fname);
|
||||
c = aprintf("%s" DIR_CHAR "%s", home, fname);
|
||||
if(c) {
|
||||
int fd = open(c, O_RDONLY);
|
||||
if(fd >= 0) {
|
||||
|
|
@ -118,7 +118,7 @@ char *findfile(const char *fname, int dotscore)
|
|||
continue;
|
||||
}
|
||||
if(conf_list[i].append) {
|
||||
char *c = curl_maprintf("%s%s", home, conf_list[i].append);
|
||||
char *c = aprintf("%s%s", home, conf_list[i].append);
|
||||
curl_free(home);
|
||||
if(!c)
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static void voutf(struct GlobalConfig *config,
|
|||
char *ptr;
|
||||
char *print_buffer;
|
||||
|
||||
print_buffer = curl_mvaprintf(fmt, ap);
|
||||
print_buffer = vaprintf(fmt, ap);
|
||||
if(!print_buffer)
|
||||
return;
|
||||
len = strlen(print_buffer);
|
||||
|
|
|
|||
|
|
@ -557,13 +557,13 @@ static CURLcode checkpasswd(const char *kind, /* for what purpose */
|
|||
|
||||
/* build a nice-looking prompt */
|
||||
if(!i && last)
|
||||
curl_msnprintf(prompt, sizeof(prompt),
|
||||
"Enter %s password for user '%s':",
|
||||
kind, *userpwd);
|
||||
msnprintf(prompt, sizeof(prompt),
|
||||
"Enter %s password for user '%s':",
|
||||
kind, *userpwd);
|
||||
else
|
||||
curl_msnprintf(prompt, sizeof(prompt),
|
||||
"Enter %s password for user '%s' on URL #%zu:",
|
||||
kind, *userpwd, i + 1);
|
||||
msnprintf(prompt, sizeof(prompt),
|
||||
"Enter %s password for user '%s' on URL #%zu:",
|
||||
kind, *userpwd, i + 1);
|
||||
|
||||
/* get password */
|
||||
getpass_r(prompt, passwd, sizeof(passwd));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue