Thread (2 messages) 2 messages, 2 authors, 2017-08-03

[PATCH] X25: constify null_x25_address

flat view
STALE3367d

From: Julia Lawall <hidden>
Date: 2017-08-02 10:00:25
Also in: kernel-janitors, lkml
Subsystem: networking [general], the rest, x.25 stack · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Martin Schiller

null_x25_address is only used to access the string it contains, so it can
be const.

Signed-off-by: Julia Lawall <redacted>

---
 net/x25/af_x25.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 5a1a98d..ac09593 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -74,7 +74,7 @@
 
 static const struct proto_ops x25_proto_ops;
 
-static struct x25_address null_x25_address = {"               "};
+static const struct x25_address null_x25_address = {"               "};
 
 #ifdef CONFIG_COMPAT
 struct compat_x25_subscrip_struct {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help