Skip to content

Commit

Permalink
docs: fix CURLINFO_*_T examples use of CURL_FORMAT_CURL_OFF_T
Browse files Browse the repository at this point in the history
- Put a percent sign before each CURL_FORMAT_CURL_OFF_T in printf.

For example "%" CURL_FORMAT_CURL_OFF_T becomes %lld or similar.

Bug: https://curl.haxx.se/mail/lib-2018-03/0140.html
Reported-by: David L.
  • Loading branch information
jay committed Mar 31, 2018
1 parent bea18c7 commit cbc0f13
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3
Expand Up @@ -48,7 +48,7 @@ if(curl) {
curl_off_t cl;
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
if(!res) {
printf("Size: " CURL_FORMAT_CURL_OFF_T "\\n", cl);
printf("Download size: %" CURL_FORMAT_CURL_OFF_T "\\n", cl);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3
Expand Up @@ -47,7 +47,7 @@ if(curl) {
curl_off_t cl;
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
if(!res) {
printf("Size: " CURL_FORMAT_CURL_OFF_T "\\n", cl);
printf("Upload size: %" CURL_FORMAT_CURL_OFF_T "\\n", cl);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3
Expand Up @@ -49,7 +49,7 @@ if(curl) {
curl_off_t dl;
res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
if(!res) {
printf("Downloaded " CURL_FORMAT_CURL_OFF_T " bytes\\n", cl);
printf("Downloaded %" CURL_FORMAT_CURL_OFF_T " bytes\\n", dl);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3
Expand Up @@ -45,7 +45,7 @@ if(curl) {
curl_off_t ul;
res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
if(!res) {
printf("Uploaded " CURL_FORMAT_CURL_OFF_T " bytes\\n", ul);
printf("Uploaded %" CURL_FORMAT_CURL_OFF_T " bytes\\n", ul);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3
Expand Up @@ -44,7 +44,7 @@ if(curl) {
curl_off_t speed;
res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
if(!res) {
printf("Download speed " CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", ul);
printf("Download speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", speed);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3
Expand Up @@ -44,7 +44,7 @@ if(curl) {
curl_off_t speed;
res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
if(!res) {
printf("Upload speed " CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", ul);
printf("Upload speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", speed);
}
}
}
Expand Down

0 comments on commit cbc0f13

Please sign in to comment.