]> The Tcpdump Group git mirrors - libpcap/commitdiff
dpdk: make the length argument dpdk_gather_data() unsigned.
authorGuy Harris <[email protected]>
Wed, 20 May 2020 00:39:39 +0000 (17:39 -0700)
committerGuy Harris <[email protected]>
Wed, 20 May 2020 00:39:39 +0000 (17:39 -0700)
It's never a negative value, and one call passes a uint32_t, so it
should be unsigned.

pcap-dpdk.c

index 4513ffbac91825d9dea13eec363523067e58021b..6064440790d4d4623b69200e8955c673c46069d6 100644 (file)
@@ -272,7 +272,7 @@ static inline void calculate_timestamp(struct dpdk_ts_helper *helper,struct time
        timeradd(&(helper->start_time), &cur_time, ts);
 }
 
-static uint32_t dpdk_gather_data(unsigned char *data, int len, struct rte_mbuf *mbuf)
+static uint32_t dpdk_gather_data(unsigned char *data, uint32_t len, struct rte_mbuf *mbuf)
 {
        uint32_t total_len = 0;
        while (mbuf && (total_len+mbuf->data_len) < len ){