]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: make sock_prot_memory_pressure() return "const char *"
authorAlexey Dobriyan <adobriyan@gmail.com>
Thu, 3 Oct 2019 21:44:40 +0000 (00:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Oct 2019 21:30:23 +0000 (14:30 -0700)
This function returns string literals which are "const char *".

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c

index e23ec80a67bf572c46b10eb04afabdaadde46924..fac2b4d80de5e54c77628073d7930bddf8a10cb3 100644 (file)
@@ -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";