Print this page
2904 hxge forgets C isn't math
@@ -891,11 +891,11 @@
p_hxge_t hxgep = rhp->hxgep;
ASSERT(rhp != NULL);
ASSERT(hxgep != NULL);
ASSERT(hxgep->statsp != NULL);
- ASSERT(0 <= rhp->index < HXGE_MAX_RDCS);
+ ASSERT((rhp->index >= 0) && (rhp->index < HXGE_MAX_RDCS));
switch (stat) {
case MAC_STAT_IERRORS:
*val = hxgep->statsp->rdc_stats[rhp->index].ierrors;
break;
@@ -923,11 +923,11 @@
p_hxge_t hxgep = rhp->hxgep;
ASSERT(rhp != NULL);
ASSERT(hxgep != NULL);
ASSERT(hxgep->statsp != NULL);
- ASSERT(0 <= rhp->index < HXGE_MAX_TDCS);
+ ASSERT((rhp->index >= 0) && (rhp->index < HXGE_MAX_TDCS));
switch (stat) {
case MAC_STAT_OERRORS:
*val = hxgep->statsp->tdc_stats[rhp->index].oerrors;
break;