public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix DHCP ipconfig.c
@ 2004-09-10  9:45 Russell King
  2004-09-10 10:46 ` viro
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2004-09-10  9:45 UTC (permalink / raw)
  To: Linux Kernel List; +Cc: Andrew Morton

bk-curr seems to be a little sick here:

  CC      net/ipv4/ipconfig.o
net/ipv4/ipconfig.c: In function `ic_bootp_recv':
net/ipv4/ipconfig.c:969: error: `i' undeclared (first use in this function)
net/ipv4/ipconfig.c:969: error: (Each undeclared identifier is reported only once
net/ipv4/ipconfig.c:969: error: for each function it appears in.)

and here's the medicine:

===== net/ipv4/ipconfig.c 1.41 vs edited =====
--- 1.41/net/ipv4/ipconfig.c	2004-09-07 23:33:17 +01:00
+++ edited/net/ipv4/ipconfig.c	2004-09-10 10:43:31 +01:00
@@ -913,7 +913,7 @@
 #ifdef IPCONFIG_DHCP
 		if (ic_proto_enabled & IC_USE_DHCP) {
 			u32 server_id = INADDR_NONE;
-			int mt = 0;
+			int mt = 0, i;
 
 			ext = &b->exten[4];
 			while (ext < end && *ext != 0xff) {


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix DHCP ipconfig.c
  2004-09-10  9:45 [PATCH] Fix DHCP ipconfig.c Russell King
@ 2004-09-10 10:46 ` viro
  0 siblings, 0 replies; 2+ messages in thread
From: viro @ 2004-09-10 10:46 UTC (permalink / raw)
  To: Linux Kernel List, Andrew Morton

On Fri, Sep 10, 2004 at 10:45:15AM +0100, Russell King wrote:
> bk-curr seems to be a little sick here:
> 
>   CC      net/ipv4/ipconfig.o
> net/ipv4/ipconfig.c: In function `ic_bootp_recv':
> net/ipv4/ipconfig.c:969: error: `i' undeclared (first use in this function)
> net/ipv4/ipconfig.c:969: error: (Each undeclared identifier is reported only once
> net/ipv4/ipconfig.c:969: error: for each function it appears in.)
> 
> and here's the medicine:

And here's better one:

diff -urN RC9-rc1-bk16-base/net/ipv4/ipconfig.c RC9-rc1-bk16-current/net/ipv4/ipconfig.c
--- RC9-rc1-bk16-base/net/ipv4/ipconfig.c	2004-09-10 02:13:24.000000000 -0400
+++ RC9-rc1-bk16-current/net/ipv4/ipconfig.c	2004-09-10 03:40:10.000000000 -0400
@@ -966,9 +966,7 @@
 				break;
 
 			case DHCPACK:
-				for (i = 0; (dev->dev_addr[i] == b->hw_addr[i])
-						&& (i < dev->addr_len); i++);
-				if (i < dev->addr_len)
+				if (memcmp(b->hw_addr, dev->dev_addr, dev->addr_len) != 0)
 					goto drop_unlock;
 
 				/* Yeah! */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-10 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-10  9:45 [PATCH] Fix DHCP ipconfig.c Russell King
2004-09-10 10:46 ` viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox