From c70c6457b256434ef039eabef243098301df0ea1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 29 Sep 2023 11:34:49 +0200 Subject: src: reverse calloc() invocation Swap object size and number of elements, so number of elements is the first argument, then object size is the second argument. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal --- src/conntrack/api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/conntrack/api.c') diff --git a/src/conntrack/api.c b/src/conntrack/api.c index d27bad2..cd8bea8 100644 --- a/src/conntrack/api.c +++ b/src/conntrack/api.c @@ -307,7 +307,7 @@ int nfct_callback_register2(struct nfct_handle *h, assert(h != NULL); - container = calloc(sizeof(struct __data_container), 1); + container = calloc(1, sizeof(struct __data_container)); if (container == NULL) return -1; @@ -1361,7 +1361,7 @@ void nfct_copy_attr(struct nf_conntrack *ct1, */ struct nfct_filter *nfct_filter_create(void) { - return calloc(sizeof(struct nfct_filter), 1); + return calloc(1, sizeof(struct nfct_filter)); } /** @@ -1500,7 +1500,7 @@ int nfct_filter_detach(int fd) */ struct nfct_filter_dump *nfct_filter_dump_create(void) { - return calloc(sizeof(struct nfct_filter_dump), 1); + return calloc(1, sizeof(struct nfct_filter_dump)); } /** -- cgit v1.2.3