From 033d15a6c56158c29d971a146156e87be9485623 Mon Sep 17 00:00:00 2001 From: git-bruh Date: Mon, 6 Sep 2021 19:21:30 +0530 Subject: [PATCH] examples/*hiperfifo.c: fix calloc arguments to match function proto Closes #7678 --- docs/examples/ephiperfifo.c | 2 +- docs/examples/evhiperfifo.c | 2 +- docs/examples/hiperfifo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/ephiperfifo.c b/docs/examples/ephiperfifo.c index 66d633c931..97e1fb5f0d 100644 --- a/docs/examples/ephiperfifo.c +++ b/docs/examples/ephiperfifo.c @@ -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); diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c index 95c64865fa..956916e775 100644 --- a/docs/examples/evhiperfifo.c +++ b/docs/examples/evhiperfifo.c @@ -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); diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c index d7d8725bf6..6a41b309a3 100644 --- a/docs/examples/hiperfifo.c +++ b/docs/examples/hiperfifo.c @@ -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); -- 2.47.3