[U-Boot-Users] question about net/net.c
Roger Larsson
roger.larsson at norran.net
Fri Oct 22 00:43:55 CEST 2004
Pseudo patch...
On Thursday 21 October 2004 18.43, Robin Getz wrote:
> void
> NetReceive(volatile uchar * inpkt, int len)
> {
>
> [snip/snip]
>
> switch (x) { // 1:st switch
>
> case PROT_ARP:
> switch (ntohs(arp->ar_op)) { // 2:nd switch
> case ARPOP_REQUEST: /* reply with our IP
> address */
> return;
>
> case ARPOP_REPLY: /* arp reply */
> /* are we waiting for a reply */
> if (!NetArpWaitPacketIP || !NetArpWaitPacketMAC)
- break; // (current) breaks 2:nd switch
+ return; //
> return;
> default:
> return;
> }
// We end up here after break with ARPOP_REPLY and not waiting
+ break;
or
+ /* no break, fall through */ // (current)
>
> case PROT_RARP:
> break;
My guess is that break should be replaced with return.
But the second break would be nice too...
/RogerL
Optronic dp AB
More information about the U-Boot
mailing list