1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-20 15:43:16 +00:00

netmap: fix build issue in netmap_user.h

The issue was a comparison of integers of different signs
on 32 bit architectures.

Reported by:	jenkins
MFC after:	1 week
This commit is contained in:
Vincenzo Maffione 2019-10-31 22:16:20 +00:00
parent c7c7805531
commit 9dd7582c12
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354231

View File

@ -1116,7 +1116,7 @@ nm_dispatch(struct nm_desc *d, int cnt, nm_cb_t cb, u_char *arg)
slot = &ring->slot[i];
d->hdr.len += slot->len;
nbuf = (u_char *)NETMAP_BUF(ring, slot->buf_idx);
if (oldbuf != NULL && nbuf - oldbuf == ring->nr_buf_size &&
if (oldbuf != NULL && nbuf - oldbuf == (int)ring->nr_buf_size &&
oldlen == ring->nr_buf_size) {
d->hdr.caplen += slot->len;
oldbuf = nbuf;