diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2021-11-21 20:41:39 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-11-23 14:24:53 +0100 |
commit | 03914ed909e377bed67479252269fedb9c696e04 (patch) | |
tree | 581e4b46168520e6e97086c86b718ee721fb7c6c /output | |
parent | af6ac4fe7e5b32a4f74eae0d6410599c65a60e03 (diff) |
output: IPFIX: correct format specifiers
There are a couple of logging calls which use the wrong specifiers for
their integer arguments. Change the specifiers to match the arguments.
Use the correct type for the variable holding the return-value of
`send(2)`.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'output')
-rw-r--r-- | output/ipfix/ulogd_output_IPFIX.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/output/ipfix/ulogd_output_IPFIX.c b/output/ipfix/ulogd_output_IPFIX.c index 5b59003..4863d00 100644 --- a/output/ipfix/ulogd_output_IPFIX.c +++ b/output/ipfix/ulogd_output_IPFIX.c @@ -198,7 +198,8 @@ static int send_msgs(struct ulogd_pluginstance *pi) struct ipfix_priv *priv = (struct ipfix_priv *) &pi->private; struct llist_head *curr, *tmp; struct ipfix_msg *msg; - int ret = ULOGD_IRET_OK, sent; + int ret = ULOGD_IRET_OK; + ssize_t sent; llist_for_each_prev(curr, &priv->list) { msg = llist_entry(curr, struct ipfix_msg, link); @@ -212,8 +213,8 @@ static int send_msgs(struct ulogd_pluginstance *pi) /* TODO handle short send() for other protocols */ if ((size_t) sent < ipfix_msg_len(msg)) - ulogd_log(ULOGD_ERROR, "short send: %d < %d\n", - sent, ipfix_msg_len(msg)); + ulogd_log(ULOGD_ERROR, "short send: %zd < %zu\n", + sent, ipfix_msg_len(msg)); } llist_for_each_safe(curr, tmp, &priv->list) { @@ -242,7 +243,7 @@ static int ipfix_ufd_cb(int fd, unsigned what, void *arg) ulogd_log(ULOGD_INFO, "connection reset by peer\n"); ulogd_unregister_fd(&priv->ufd); } else - ulogd_log(ULOGD_INFO, "unexpected data (%d bytes)\n", nread); + ulogd_log(ULOGD_INFO, "unexpected data (%zd bytes)\n", nread); } return 0; |