From 9d37fa4d4cd3ab5ab39063683a41a176f28dd6b0 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 11 Jul 2010 14:54:19 +0200 Subject: nflog: remove `0x' from HW protocol in output of nflog_snprintf_xml() This patch removes the prefix `0x' of the HW protocol. Signed-off-by: Pablo Neira Ayuso --- src/libnetfilter_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libnetfilter_log.c') diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c index 0e49e62..cad78aa 100644 --- a/src/libnetfilter_log.c +++ b/src/libnetfilter_log.c @@ -561,7 +561,7 @@ int nflog_snprintf_xml(char *buf, size_t rem, struct nflog_data *tb, int flags) if (hwph && (flags & NFLOG_XML_HW)) { int i, hlen = ntohs(hwph->hw_addrlen); - size = snprintf(buf + offset, rem, "0x%04x" + size = snprintf(buf + offset, rem, "%04x" "", ntohs(ph->hw_protocol)); SNPRINTF_FAILURE(size, rem, offset, len); @@ -578,7 +578,7 @@ int nflog_snprintf_xml(char *buf, size_t rem, struct nflog_data *tb, int flags) size = snprintf(buf + offset, rem, ""); SNPRINTF_FAILURE(size, rem, offset, len); } else if (flags & NFLOG_XML_HW) { - size = snprintf(buf + offset, rem, "0x%04x" + size = snprintf(buf + offset, rem, "%04x" "", ntohs(ph->hw_protocol)); SNPRINTF_FAILURE(size, rem, offset, len); -- cgit v1.2.3