diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-09-29 11:34:49 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-10-02 12:16:24 +0200 |
commit | c70c6457b256434ef039eabef243098301df0ea1 (patch) | |
tree | 5008ca0108dcf7df51a0c3a310d84d12b95040f2 /src/conntrack/api.c | |
parent | d9e4d162d109458938dcd188eb5eb78bab90a898 (diff) |
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 <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/conntrack/api.c')
-rw-r--r-- | src/conntrack/api.c | 6 |
1 files changed, 3 insertions, 3 deletions
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)); } /** |