[cs89x0] Simplify obscure loop syntax
authorMichael Brown <mcb30@etherboot.org>
Sat, 11 Oct 2008 23:39:57 +0000 (00:39 +0100)
committerMichael Brown <mcb30@etherboot.org>
Sat, 11 Oct 2008 23:54:58 +0000 (00:54 +0100)
src/drivers/net/cs89x0.c

index 11988ad..1f647a8 100644 (file)
@@ -419,8 +419,8 @@ retry:
              ETH_ALEN/2);
        outw(((t >> 8)&0xFF)|(t << 8), eth_nic_base + TX_FRAME_PORT);
        outsw(eth_nic_base + TX_FRAME_PORT, p, (s+1)/2);
-       for (sr = sr/2 - (s+1)/2 - ETH_ALEN - 1; sr-- > 0;
-            outw(0, eth_nic_base + TX_FRAME_PORT));
+       for (sr = sr/2 - (s+1)/2 - ETH_ALEN - 1; sr > 0; sr--)
+               outw(0, eth_nic_base + TX_FRAME_PORT);
 
        /* wait for transfer to succeed */
        for (tmo = currticks()+5*TICKS_PER_SEC;