Skip to contentSkip to conversation

remove unnecessary zero initializations from aironet4500_proc.c (245ac1)

PATCH In review Rasmus Andersen 2 participants 2 messages May 28, 2001 – Jun 1, 2001 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove unnecessary zero initializations from aironet4500_proc.c (245ac1)

(Forgot l-k again... :<)

----- Forwarded message from Rasmus Andersen <[email protected]> -----

Hi.

The following patch removes two superfluous initializations from aironet4500_proc.c, making the .o ~12K smaller in size. It applies against 245ac1 and was discovered by Adam Ritcher some time ago.

drivers/net/aironet4500_proc.c +2 -3
@@ -59,7 +59,7 @@
 	char 				proc_name[10];
 };	        
 static char awc_drive_info[AWC_STR_SIZE]="Zcom \n\0";
-static char awc_proc_buff[AWC_STR_SIZE]="\0";
+static char awc_proc_buff[AWC_STR_SIZE];
 static int  awc_int_buff;
 static struct awc_proc_private awc_proc_priv[MAX_AWCS]; 
 
@@ -403,7 +403,7 @@
         {0}
 };
 
-struct ctl_table_header * awc_driver_sysctl_header = NULL;
+struct ctl_table_header * awc_driver_sysctl_header;
 
 const char awc_procname[]= "awc5";
-- 

Rasmus([email protected])

"If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot)." -- Terry Lambert, FreeBSD-Hackers mailing list.

#1 lore raw

Hi!

drivers/net/aironet4500_proc.c line 61

Quoted 13 lines

Hi.

The following patch removes two superfluous initializations from aironet4500_proc.c, making the .o ~12K smaller in size. It applies against 245ac1 and was discovered by Adam Ritcher some time ago.

drivers/net/aironet4500_proc.c +0 -0
@@ -59,7 +59,7 @@
 	char 				proc_name[10];
 };	        
 static char awc_drive_info[AWC_STR_SIZE]="Zcom \n\0";
						    ~~

When you are at cleaning, kill that ugly \0, too.

Quoted 9 lines
drivers/net/aironet4500_proc.c +1 -1
-static char awc_proc_buff[AWC_STR_SIZE]="\0";
+static char awc_proc_buff[AWC_STR_SIZE];
 
 
 

static int awc_int_buff;
static struct awc_proc_private awc_proc_priv[MAX_AWCS];

drivers/net/aironet4500_proc.c line 408

Quoted 7 lines
drivers/net/aironet4500_proc.c +1 -1
@@ -403,7 +403,7 @@
         {0}
 };
 
-struct ctl_table_header * awc_driver_sysctl_header = NULL;
+struct ctl_table_header * awc_driver_sysctl_header;
 
 const char awc_procname[]= "awc5";

Pavel

Signature · 2 lines
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]