diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2021-11-21 20:41:38 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-11-23 14:24:53 +0100 |
commit | af6ac4fe7e5b32a4f74eae0d6410599c65a60e03 (patch) | |
tree | d6ff25dc82a6968b35beb6fab86154c9b8a0d014 | |
parent | efbbcb757fef41caf18f789861b3141cee3be753 (diff) |
input: UNIXSOCK: 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.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | input/packet/ulogd_inppkt_UNIXSOCK.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/input/packet/ulogd_inppkt_UNIXSOCK.c b/input/packet/ulogd_inppkt_UNIXSOCK.c index 39944bf..86ab590 100644 --- a/input/packet/ulogd_inppkt_UNIXSOCK.c +++ b/input/packet/ulogd_inppkt_UNIXSOCK.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <inttypes.h> #include <unistd.h> #include <stdlib.h> #include <netinet/ether.h> @@ -632,9 +633,9 @@ static int unixsock_instance_read_cb(int fd, unsigned int what, void *param) packet_sig = ntohl(unixsock_packet->marker); if (packet_sig != ULOGD_SOCKET_MARK) { ulogd_log(ULOGD_ERROR, - "ulogd2: invalid packet marked received " - "(read %lx, expected %lx), closing socket.\n", - packet_sig, ULOGD_SOCKET_MARK); + "ulogd2: invalid packet marked received " + "(read %" PRIx32 ", expected %" PRIx32 "), closing socket.\n", + packet_sig, ULOGD_SOCKET_MARK); _disconnect_client(ui); return -1; @@ -663,8 +664,8 @@ static int unixsock_instance_read_cb(int fd, unsigned int what, void *param) } } else { - ulogd_log(ULOGD_DEBUG, " We have %d bytes, but need %d. Requesting more\n", - ui->unixsock_buf_avail, needed_len + sizeof(uint32_t)); + ulogd_log(ULOGD_DEBUG, " We have %u bytes, but need %zu. Requesting more\n", + ui->unixsock_buf_avail, needed_len + sizeof(uint32_t)); return 0; } |