diff options
author | Gisle Vanem <gisle.vanem@gmail.com> | 2019-08-20 15:17:16 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-08-21 09:48:00 +0200 |
commit | 216dd886e7ee5558f0a2b1fbb492b321d8d32687 (patch) | |
tree | cfbca515c4e9a9ecde93aa425c94e17c2be0d87a /docs | |
parent | e59540139a398dc70fde6aec487b19c5085105af (diff) |
docs/examples/curlx: fix errors
Initialise 'mimetype' and require the -p12 arg.
Closes #4248
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/curlx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/curlx.c b/docs/examples/curlx.c index df4ab3fa2..830207970 100644 --- a/docs/examples/curlx.c +++ b/docs/examples/curlx.c @@ -277,7 +277,7 @@ int main(int argc, char **argv) int tabLength = 100; char *binaryptr; - char *mimetype; + char *mimetype = NULL; char *mimetypeaccept = NULL; char *contenttype; const char **pp; @@ -294,7 +294,7 @@ int main(int argc, char **argv) binaryptr = malloc(tabLength); - p.verbose = 0; + memset(&p, '\0', sizeof(p)); p.errorbio = BIO_new_fp(stderr, BIO_NOCLOSE); curl_global_init(CURL_GLOBAL_DEFAULT); @@ -372,7 +372,7 @@ int main(int argc, char **argv) args++; } - if(mimetype == NULL || mimetypeaccept == NULL) + if(mimetype == NULL || mimetypeaccept == NULL || p.p12file == NULL) badarg = 1; if(badarg) { |