mirror of
https://github.com/curl/curl.git
synced 2026-08-25 22:13:33 +03:00
lib: use FMT_ as prefix instead of CURL_FORMAT_
For printf format defines used internally. Makes the code slighly easier to read. Closes #14764
This commit is contained in:
parent
a2bcec0ee0
commit
4ff04615a0
40 changed files with 357 additions and 395 deletions
|
|
@ -2066,7 +2066,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
else {
|
||||
curl_off_t size = attrs.filesize;
|
||||
if(size < 0) {
|
||||
failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
|
||||
failf(data, "Bad file size (%" FMT_OFF_T ")", size);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
data->state.resume_from = attrs.filesize;
|
||||
|
|
@ -2507,7 +2507,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
curl_off_t size = attrs.filesize;
|
||||
|
||||
if(size < 0) {
|
||||
failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
|
||||
failf(data, "Bad file size (%" FMT_OFF_T ")", size);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
if(data->state.use_range) {
|
||||
|
|
@ -2535,10 +2535,8 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
to = size - 1;
|
||||
}
|
||||
if(from > size) {
|
||||
failf(data, "Offset (%"
|
||||
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
||||
CURL_FORMAT_CURL_OFF_T ")", from,
|
||||
(curl_off_t)attrs.filesize);
|
||||
failf(data, "Offset (%" FMT_OFF_T ") was beyond file size (%"
|
||||
FMT_OFF_T ")", from, (curl_off_t)attrs.filesize);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
if(from > to) {
|
||||
|
|
@ -2563,9 +2561,8 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
if(data->state.resume_from < 0) {
|
||||
/* We are supposed to download the last abs(from) bytes */
|
||||
if((curl_off_t)attrs.filesize < -data->state.resume_from) {
|
||||
failf(data, "Offset (%"
|
||||
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
||||
CURL_FORMAT_CURL_OFF_T ")",
|
||||
failf(data, "Offset (%" FMT_OFF_T ") was beyond file size (%"
|
||||
FMT_OFF_T ")",
|
||||
data->state.resume_from, (curl_off_t)attrs.filesize);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
|
|
@ -2574,8 +2571,8 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
}
|
||||
else {
|
||||
if((curl_off_t)attrs.filesize < data->state.resume_from) {
|
||||
failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
|
||||
") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
|
||||
failf(data, "Offset (%" FMT_OFF_T
|
||||
") was beyond file size (%" FMT_OFF_T ")",
|
||||
data->state.resume_from, (curl_off_t)attrs.filesize);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue