From: Roger Larsson Date: Fri, 22 Oct 2004 00:43:55 +0200 Subject: [U-Boot-Users] question about net/net.c In-Reply-To: <6.1.1.1.0.20041021094242.01deca40@wheresmymailserver.com> References: <6.1.1.1.0.20041021094242.01deca40@wheresmymailserver.com> Message-ID: <200410220043.55766.roger.larsson@norran.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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