From 9ba33008d3f7b45c5004943768822f1990d2cd0b Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 11 Jul 2010 15:08:40 +0200 Subject: nfq: remove `0x' from HW protocol in output of nfq_snprintf_xml() This patch removes the prefix `0x' of the HW protocol. Signed-off-by: Pablo Neira Ayuso --- src/libnetfilter_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c index 7269042..97bb49e 100644 --- a/src/libnetfilter_queue.c +++ b/src/libnetfilter_queue.c @@ -1087,7 +1087,7 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) if (hwph && (flags & NFQ_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); @@ -1104,7 +1104,7 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) size = snprintf(buf + offset, rem, ""); SNPRINTF_FAILURE(size, rem, offset, len); } else if (flags & NFQ_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