From 60bd22620a1e63fb163a788f9565b94d138c6030 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Tue, 31 Dec 2013 11:10:25 +0000 Subject: mprintf: Replaced internal usage of FORMAT_OFF_T and FORMAT_OFF_TU Following commit 0aafd77fa4c6f2, 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. --- lib/ssh.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/ssh.c') diff --git a/lib/ssh.c b/lib/ssh.c index a4b2c673b..9838c9579 100644 --- a/lib/ssh.c +++ b/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; } -- cgit v1.2.3