Skip to contentSkip to conversation

kernel: removed unnecessary initialization of static variable

PATCH In review Gangadhar Vukkesala 2 participants 2 messages Dec 21, 2014 Namespaces:

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel: removed unnecessary initialization of static variable

Removed unnecessary initialization of static variable "zero" to 0 in pid_namespace.c as default value of static variable is 0. This issue was found when running checkpatch.pl script on pid_namespace.c.

---
 kernel/pid_namespace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/pid_namespace.c +1 -1
index a65ba13..f21eb3f 100644
@@ -290,7 +290,7 @@ static int pid_ns_ctl_handler(struct ctl_table *table, int write,
 }
 
 extern int pid_max;
-static int zero = 0;
+static int zero;
 static struct ctl_table pid_ns_ctl_table[] = {
 	{
 		.procname = "ns_last_pid",
Signature · 1 line
Gangadhar Vukkesala
Reviewed-by on v1 1/1
#1 lore raw

Gangadhar,

Quoted 30 lines · Gangadhar Vukkesala

Removed unnecessary initialization of static variable "zero" to 0 in pid_namespace.c as default value of static variable is 0. This issue was found when running checkpatch.pl script on pid_namespace.c.

---
 kernel/pid_namespace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/pid_namespace.c +1 -1
index a65ba13..f21eb3f 100644
@@ -290,7 +290,7 @@ static int pid_ns_ctl_handler(struct ctl_table *table, int write,
 }
 
 extern int pid_max;
-static int zero = 0;
+static int zero;
 static struct ctl_table pid_ns_ctl_table[] = {
 	{
 		.procname = "ns_last_pid",
Signature · 7 lines
Gangadhar Vukkesala

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Looks good.

Signature · 1 line
- Jeremiah Mahler