examples/*hiperfifo.c: fix calloc arguments to match function proto

Closes #7678
This commit is contained in:
git-bruh 2021-09-06 19:21:30 +05:30 committed by Daniel Stenberg
parent db50fc6e95
commit 033d15a6c5
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 3 additions and 3 deletions

View File

@ -292,7 +292,7 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
/* Initialize a new SockInfo structure */
static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
{
SockInfo *fdp = (SockInfo*)calloc(sizeof(SockInfo), 1);
SockInfo *fdp = (SockInfo*)calloc(1, sizeof(SockInfo));
fdp->global = g;
setsock(fdp, s, easy, action, g);

View File

@ -266,7 +266,7 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
/* Initialize a new SockInfo structure */
static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
{
SockInfo *fdp = calloc(sizeof(SockInfo), 1);
SockInfo *fdp = calloc(1, sizeof(SockInfo));
fdp->global = g;
setsock(fdp, s, easy, action, g);

View File

@ -266,7 +266,7 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
/* Initialize a new SockInfo structure */
static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
{
SockInfo *fdp = calloc(sizeof(SockInfo), 1);
SockInfo *fdp = calloc(1, sizeof(SockInfo));
fdp->global = g;
setsock(fdp, s, easy, action, g);