From: Ruben Kerkhof Date: Thu, 11 Aug 2016 15:14:54 +0000 (+0200) Subject: common.c: fix calloc arguments order X-Git-Tag: collectd-5.6.0~56 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b7ebbd511e7fb9faf40a50904d6634824f5d8e52;p=collectd.git common.c: fix calloc arguments order --- diff --git a/src/daemon/common.c b/src/daemon/common.c index 45f9d533..05b11990 100644 --- a/src/daemon/common.c +++ b/src/daemon/common.c @@ -1677,14 +1677,14 @@ void strarray_free (char **array, size_t array_len) /* {{{ */ int check_capability (int capability) /* {{{ */ { #ifdef _LINUX_CAPABILITY_VERSION_3 - cap_user_header_t cap_header = calloc(sizeof (*cap_header), 1); + cap_user_header_t cap_header = calloc(1, sizeof (*cap_header)); if (cap_header == NULL) { ERROR("check_capability: calloc failed"); return (-1); } - cap_user_data_t cap_data = calloc(sizeof (*cap_data), 1); + cap_user_data_t cap_data = calloc(1, sizeof (*cap_data)); if (cap_data == NULL) { ERROR("check_capability: calloc failed");