Clean up awkward code sequences in ether driver.
authorDan Cross <cross@gajendra.net>
Thu, 24 Sep 2015 01:20:06 +0000 (21:20 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 24 Sep 2015 18:48:57 +0000 (14:48 -0400)
commitbd4c05ede5f9a6d54c7192abbb1e14cbcd10f822
tree0e5183c505a27955339d042cfb029286d6568e6f
parent3c71ff4906637188c45c98191833e84268f8ce47
Clean up awkward code sequences in ether driver.

Rework two awkward code sequences in the ethernet driver to
make the logic easier to follow.

In the first case, put explicit freeb() and early returns
into etheroq in the cases where we are looping a frame back
up the stack.

In the second, change the loop in etheriq to use 'guard'
conditions and early continues to make the logic linear.
kern/drivers/dev/ether.c