diff options
Diffstat (limited to 'output/ipfix/ipfix.c')
-rw-r--r-- | output/ipfix/ipfix.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/output/ipfix/ipfix.c b/output/ipfix/ipfix.c index 4bb432a..e0b3440 100644 --- a/output/ipfix/ipfix.c +++ b/output/ipfix/ipfix.c @@ -8,8 +8,6 @@ /* These forward declarations are needed since ulogd.h doesn't like to be the first */ #include <ulogd/linuxlist.h> -#define __packed __attribute__((packed)) - #include "ipfix.h" #include <ulogd/ulogd.h> @@ -85,8 +83,7 @@ struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid, int tid) (len < IPFIX_HDRLEN + IPFIX_SET_HDRLEN)) return NULL; - msg = malloc(sizeof(struct ipfix_msg) + len); - memset(msg, 0, sizeof(struct ipfix_msg)); + msg = calloc(1, sizeof(struct ipfix_msg) + len); msg->tid = tid; msg->end = msg->data + len; msg->tail = msg->data + IPFIX_HDRLEN; @@ -95,7 +92,6 @@ struct ipfix_msg *ipfix_msg_alloc(size_t len, uint32_t oid, int tid) /* Initialize message header */ hdr = ipfix_msg_hdr(msg); - memset(hdr, 0, IPFIX_HDRLEN); hdr->version = htons(IPFIX_VERSION); hdr->oid = htonl(oid); |