From: Alexey Dobriyan Date: Thu, 3 Oct 2019 21:44:40 +0000 (+0300) Subject: net: make sock_prot_memory_pressure() return "const char *" X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7a512eb865aa5fcfb396c71047bc9c3b046836b3;p=openwrt%2Fstaging%2Fblogic.git net: make sock_prot_memory_pressure() return "const char *" This function returns string literals which are "const char *". Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller --- diff --git a/net/core/sock.c b/net/core/sock.c index e23ec80a67bf..fac2b4d80de5 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3497,7 +3497,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";