diff options
author | Viktor Szakats <vszakats@users.noreply.github.com> | 2017-09-04 13:58:10 +0000 |
---|---|---|
committer | Viktor Szakats <vszakats@users.noreply.github.com> | 2017-09-04 13:58:10 +0000 |
commit | 841a09ea19f9b6ec4f18d761578cef44ada2810b (patch) | |
tree | 07e368744fa5e1bece87e41612a22806da6d1c03 /docs/examples | |
parent | 202c1cc22fc3b83dff93b7181f8eb3cc1a8e4a3f (diff) | |
download | curl-841a09ea19f9b6ec4f18d761578cef44ada2810b.tar.gz |
mime: use CURL_ZERO_TERMINATED in examples
and some minor whitespace fixes
Diffstat (limited to 'docs/examples')
-rw-r--r-- | docs/examples/multi-post.c | 10 | ||||
-rw-r--r-- | docs/examples/postit2.c | 10 | ||||
-rw-r--r-- | docs/examples/smtp-mime.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c index 3777f521a..f3e592e55 100644 --- a/docs/examples/multi-post.c +++ b/docs/examples/multi-post.c @@ -51,18 +51,18 @@ int main(void) /* Fill in the file upload field */ field = curl_mime_addpart(form); - curl_mime_name(field, "sendfile", -1); + curl_mime_name(field, "sendfile", CURL_ZERO_TERMINATED); curl_mime_filedata(field, "multi-post.c"); /* Fill in the filename field */ field = curl_mime_addpart(form); - curl_mime_name(field, "filename", -1); - curl_mime_data(field, "multi-post.c", -1); + curl_mime_name(field, "filename", CURL_ZERO_TERMINATED); + curl_mime_data(field, "multi-post.c", CURL_ZERO_TERMINATED); /* Fill in the submit field too, even if this is rarely needed */ field = curl_mime_addpart(form); - curl_mime_name(field, "submit", -1); - curl_mime_data(field, "send", -1); + curl_mime_name(field, "submit", CURL_ZERO_TERMINATED); + curl_mime_data(field, "send", CURL_ZERO_TERMINATED); /* initialize custom header list (stating that Expect: 100-continue is not wanted */ diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index f4c0a8f32..ca5c77dc4 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -61,18 +61,18 @@ int main(int argc, char *argv[]) /* Fill in the file upload field */ field = curl_mime_addpart(form); - curl_mime_name(field, "sendfile", -1); + curl_mime_name(field, "sendfile", CURL_ZERO_TERMINATED); curl_mime_filedata(field, "postit2.c"); /* Fill in the filename field */ field = curl_mime_addpart(form); - curl_mime_name(field, "filename", -1); - curl_mime_data(field, "postit2.c", -1); + curl_mime_name(field, "filename", CURL_ZERO_TERMINATED); + curl_mime_data(field, "postit2.c", CURL_ZERO_TERMINATED); /* Fill in the submit field too, even if this is rarely needed */ field = curl_mime_addpart(form); - curl_mime_name(field, "submit", -1); - curl_mime_data(field, "send", -1); + curl_mime_name(field, "submit", CURL_ZERO_TERMINATED); + curl_mime_data(field, "send", CURL_ZERO_TERMINATED); /* initialize custom header list (stating that Expect: 100-continue is not wanted */ diff --git a/docs/examples/smtp-mime.c b/docs/examples/smtp-mime.c index 2895dbc31..c611ac437 100644 --- a/docs/examples/smtp-mime.c +++ b/docs/examples/smtp-mime.c @@ -113,12 +113,12 @@ int main(void) /* HTML message. */ part = curl_mime_addpart(alt); - curl_mime_data(part, inline_html, -1); + curl_mime_data(part, inline_html, CURL_ZERO_TERMINATED); curl_mime_type(part, "text/html"); /* Text message. */ part = curl_mime_addpart(alt); - curl_mime_data(part, inline_text, -1); + curl_mime_data(part, inline_text, CURL_ZERO_TERMINATED); /* Create the inline part. */ part = curl_mime_addpart(mime); |