mprintf: Replaced internal usage of FORMAT_OFF_T and FORMAT_OFF_TU
Following commit 0aafd77fa4, replaced the internal usage of
FORMAT_OFF_T and FORMAT_OFF_TU with the external versions that we
expect API programmers to use.
This negates the need for separate definitions which were subtly
different under different platforms/compilers.
This commit is contained in:
15
lib/ssh.c
15
lib/ssh.c
@@ -1602,7 +1602,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
||||
else {
|
||||
curl_off_t size = attrs.filesize;
|
||||
if(size < 0) {
|
||||
failf(data, "Bad file size (%" FORMAT_OFF_T ")", size);
|
||||
failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
data->state.resume_from = attrs.filesize;
|
||||
@@ -2070,7 +2070,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
||||
curl_off_t size = attrs.filesize;
|
||||
|
||||
if(size < 0) {
|
||||
failf(data, "Bad file size (%" FORMAT_OFF_T ")", size);
|
||||
failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
if(conn->data->state.use_range) {
|
||||
@@ -2092,8 +2092,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
||||
}
|
||||
if(from >= size) {
|
||||
failf(data, "Offset (%"
|
||||
FORMAT_OFF_T ") was beyond file size (%" FORMAT_OFF_T ")",
|
||||
from, attrs.filesize);
|
||||
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
||||
CURL_FORMAT_CURL_OFF_T ")", from, attrs.filesize);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
if(from > to) {
|
||||
@@ -2117,7 +2117,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
||||
/* We're supposed to download the last abs(from) bytes */
|
||||
if((curl_off_t)attrs.filesize < -data->state.resume_from) {
|
||||
failf(data, "Offset (%"
|
||||
FORMAT_OFF_T ") was beyond file size (%" FORMAT_OFF_T ")",
|
||||
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
||||
CURL_FORMAT_CURL_OFF_T ")",
|
||||
data->state.resume_from, attrs.filesize);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
@@ -2126,8 +2127,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
||||
}
|
||||
else {
|
||||
if((curl_off_t)attrs.filesize < data->state.resume_from) {
|
||||
failf(data, "Offset (%" FORMAT_OFF_T
|
||||
") was beyond file size (%" FORMAT_OFF_T ")",
|
||||
failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
|
||||
") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
|
||||
data->state.resume_from, attrs.filesize);
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user