2002-11-02 06:44:43

by Frank Davis

[permalink] [raw]
Subject: [PATCH] 2.5.45 : net/ipv4/ipconfig.c

Hello all,
The following patch moves a variable to a place prior to a label (no
reinitialization). Please review.

Regards,
Frank

--- linux/net/ipv4/ipconfig.c.old Sat Oct 19 12:08:27 2002
+++ linux/net/ipv4/ipconfig.c Fri Nov 1 22:02:27 2002
@@ -1144,6 +1144,7 @@

DBG(("IP-Config: Entered.\n"));
#ifdef IPCONFIG_DYNAMIC
+ int retries = CONF_OPEN_RETRIES;
try_try_again:
#endif
/* Give hardware a chance to settle */
@@ -1175,8 +1176,6 @@
ic_first_dev->next) {
#ifdef IPCONFIG_DYNAMIC

- int retries = CONF_OPEN_RETRIES;
-
if (ic_dynamic() < 0) {
ic_close_devs();



2002-11-02 09:53:33

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] 2.5.45 : net/ipv4/ipconfig.c

On Fri, 2002-11-01 at 23:43, Frank Davis wrote:
> Hello all,
> The following patch moves a variable to a place prior to a label (no
> reinitialization). Please review.

I definitely consider the existing code much cleaner, and GCC
allocated registers much more effectively when you place variables
only in the inner most scope in which they are used.