Thread (4 messages) 4 messages, 3 authors, 2021-10-28
STALE1704d

[PATCH net-next] batman-adv: Fix the wrong definition

From: Yajun Deng <hidden>
Date: 2021-10-28 07:23:28
Also in: batman, lkml
Subsystem: batman advanced, the rest · Maintainers: Marek Lindner, Simon Wunderlich, Antonio Quartulli, Sven Eckelmann, Linus Torvalds

There are three variables that are required at most,
no need to define four variables.

Fixes: 0fa4c30d710d ("batman-adv: Make sysfs support optional")
Signed-off-by: Yajun Deng <redacted>
---
 net/batman-adv/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 3ddd66e4c29e..758035b3796d 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -656,7 +656,7 @@ int batadv_throw_uevent(struct batadv_priv *bat_priv, enum batadv_uev_type type,
 {
 	int ret = -ENOMEM;
 	struct kobject *bat_kobj;
-	char *uevent_env[4] = { NULL, NULL, NULL, NULL };
+	char *uevent_env[3] = {};
 
 	bat_kobj = &bat_priv->soft_iface->dev.kobj;
 
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help