void -Wsign-compare issue and add a stupid cast.

revert this if m_pkthdr.len becomes unsigned.
This commit is contained in:
mrg 2019-08-11 05:14:41 +00:00
parent 32428abeb6
commit 70dcdf5643

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_axe.c,v 1.111 2019/08/11 02:37:03 mrg Exp $ */
/* $NetBSD: if_axe.c,v 1.112 2019/08/11 05:14:41 mrg Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.111 2019/08/11 02:37:03 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.112 2019/08/11 05:14:41 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -1192,7 +1192,7 @@ axe_tx_prepare(struct usbnet *un, struct mbuf *m, struct usbnet_chain *c)
length, m->m_pkthdr.len, sizeof(hdr), 0);
}
if (m->m_pkthdr.len > un->un_tx_bufsz - hdr_len - tlr_len)
if ((unsigned)m->m_pkthdr.len > un->un_tx_bufsz - hdr_len - tlr_len)
return 0;
length = hdr_len + m->m_pkthdr.len + tlr_len;