diff mbox series

netfilter: nf_conntrack_sip: Fix inconsistent of format with argument type in nf_nat_sip.

Message ID 20201009070335.63812-1-yebin10@huawei.com
State Under Review
Delegated to: Pablo Neira
Headers show
Series netfilter: nf_conntrack_sip: Fix inconsistent of format with argument type in nf_nat_sip. | expand

Commit Message

Ye Bin Oct. 9, 2020, 7:03 a.m. UTC
Fix follow warning:
[net/netfilter/nf_nat_sip.c:469]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 net/netfilter/nf_nat_sip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/netfilter/nf_nat_sip.c b/net/netfilter/nf_nat_sip.c
index f0a735e86851..39754fb3a298 100644
--- a/net/netfilter/nf_nat_sip.c
+++ b/net/netfilter/nf_nat_sip.c
@@ -466,7 +466,7 @@  static int mangle_content_len(struct sk_buff *skb, unsigned int protoff,
 			      &matchoff, &matchlen) <= 0)
 		return 0;
 
-	buflen = sprintf(buffer, "%u", c_len);
+	buflen = sprintf(buffer, "%d", c_len);
 	return mangle_packet(skb, protoff, dataoff, dptr, datalen,
 			     matchoff, matchlen, buffer, buflen);
 }