diff options
-rw-r--r-- | sys/dev/usb/if_axe.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_smsc.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 839c1f3ed46..50a5a96599f 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.120 2013/06/03 22:36:15 yuo Exp $ */ +/* $OpenBSD: if_axe.c,v 1.121 2013/07/02 19:27:15 brad Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -1056,7 +1056,7 @@ axe_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) if ((pktlen % 2) != 0) pktlen++; - if ((total_len - pktlen) < 0) + if (total_len < pktlen) total_len = 0; else total_len -= pktlen; diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c index 5f6ae133ff2..6318b049751 100644 --- a/sys/dev/usb/if_smsc.c +++ b/sys/dev/usb/if_smsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_smsc.c,v 1.7 2013/04/15 09:23:01 mglocker Exp $ */ +/* $OpenBSD: if_smsc.c,v 1.8 2013/07/02 19:27:15 brad Exp $ */ /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ /*- * Copyright (c) 2012 @@ -1247,7 +1247,7 @@ smsc_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) buf += sizeof(rxhdr); - if ((total_len - pktlen) < 0) + if (total_len < pktlen) total_len = 0; else total_len -= pktlen; |