diff mbox series

[v2,2/6] net/pcap: fix format string

Message ID 20210214021616.26970-3-dmitry.kozliuk@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/pcap: build on Windows | expand

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Dmitry Kozlyuk Feb. 14, 2021, 2:16 a.m. UTC
Use PRIu32 for uint32_t (found by -Wformat with Clang on Windows).

Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ferruh Yigit Feb. 25, 2021, 2:45 p.m. UTC | #1
On 2/14/2021 2:16 AM, Dmitry Kozlyuk wrote:
> Use PRIu32 for uint32_t (found by -Wformat with Clang on Windows).
> 
> Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit March 2, 2021, 11:48 a.m. UTC | #2
On 2/25/2021 2:45 PM, Ferruh Yigit wrote:
> On 2/14/2021 2:16 AM, Dmitry Kozlyuk wrote:
>> Use PRIu32 for uint32_t (found by -Wformat with Clang on Windows).
>>
>> Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

This is trivial fix and not directly related to the patchset, let me merge it 
and get out of way, in next version you don't need to include this patch.

Applied to dpdk-next-net/main, thanks.
diff mbox series

Patch

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 90f5d75ea..176928da3 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -827,7 +827,7 @@  eth_rx_queue_setup(struct rte_eth_dev *dev,
 
 		pcap_pkt_count = count_packets_in_pcap(pcap, pcap_q);
 
-		snprintf(ring_name, sizeof(ring_name), "PCAP_RING%" PRIu16,
+		snprintf(ring_name, sizeof(ring_name), "PCAP_RING%" PRIu32,
 				ring_number);
 
 		pcap_q->pkts = rte_ring_create(ring_name,