]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples/*hiperfifo.c: fix calloc arguments to match function proto
authorgit-bruh <e817509a-8ee9-4332-b0ad-3a6bdf9ab63f@aleeas.com>
Mon, 6 Sep 2021 13:51:30 +0000 (19:21 +0530)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Sep 2021 14:16:52 +0000 (16:16 +0200)
Closes #7678

docs/examples/ephiperfifo.c
docs/examples/evhiperfifo.c
docs/examples/hiperfifo.c

index 66d633c931fcfed46dd83be4b9c760025113e5a6..97e1fb5f0d0b5fbaa8bec7287c72ac2177f2d0fc 100644 (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);
index 95c64865fa6772420c41ec30a8f01cf02ca15f09..956916e775f971a66ff9f7927e745932690c8b48 100644 (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);
index d7d8725bf6eb1d836d3aa5d95add9ac3c8d6c75f..6a41b309a34be50bcd9b0deb008cd0188099eeed 100644 (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);