1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

curl_url_set.3: properly escape \n in example code

This yields

  "the scheme is %s\n"

instead of

  "the scheme is %s0

Closes #2970
This commit is contained in:
Dave Reisner 2018-09-10 09:39:33 -04:00 committed by Daniel Stenberg
parent 0411057380
commit c1e5980f66
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -97,7 +97,7 @@ If this function returns an error, no URL part is returned.
char *scheme; char *scheme;
rc = curl_url_get(url, CURLUPART_SCHEME, &scheme, 0); rc = curl_url_get(url, CURLUPART_SCHEME, &scheme, 0);
if(!rc) { if(!rc) {
printf("the scheme is %s\n", scheme); printf("the scheme is %s\\n", scheme);
curl_free(scheme); curl_free(scheme);
} }
curl_url_cleanup(url); curl_url_cleanup(url);