Skip to contentSkip to conversation

net: make sock_prot_memory_pressure() return "const char *"

PATCH Applied Alexey Dobriyan 2 participants 2 messages Oct 3, 2019 – Oct 4, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: make sock_prot_memory_pressure() return "const char *"

This function returns string literals which are "const char *".

---

 net/core/sock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/sock.c +1 -1
@@ -3493,7 +3493,7 @@ static long sock_prot_memory_allocated(struct proto *proto)
 	return proto->memory_allocated != NULL ? proto_memory_allocated(proto) : -1L;
 }
 
-static char *sock_prot_memory_pressure(struct proto *proto)
+static const char *sock_prot_memory_pressure(struct proto *proto)
 {
 	return proto->memory_pressure != NULL ?
 	proto_memory_pressure(proto) ? "yes" : "no" : "NI";