1
0
mirror of https://github.com/moparisthebest/curl synced 2025-01-10 21:48:10 -05:00

docs/examples/curlx: fix errors

Initialise 'mimetype' and require the -p12 arg.

Closes #4248
This commit is contained in:
Gisle Vanem 2019-08-20 15:17:16 +02:00 committed by Daniel Stenberg
parent e59540139a
commit 216dd886e7
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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) {