]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: constify sock_diag_check_cookie()
authorEric Dumazet <edumazet@google.com>
Tue, 10 Mar 2015 14:15:52 +0000 (07:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2015 17:45:28 +0000 (13:45 -0400)
sock_diag_check_cookie() second parameter is constant

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sock_diag.h
net/core/sock_diag.c

index 46cca4c06848346ca84753ac182526a4514ff277..b5ad7d35a636dba640825e151ccf972417677286 100644 (file)
@@ -19,7 +19,7 @@ void sock_diag_unregister(const struct sock_diag_handler *h);
 void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
 void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
 
-int sock_diag_check_cookie(void *sk, __u32 *cookie);
+int sock_diag_check_cookie(void *sk, const __u32 *cookie);
 void sock_diag_save_cookie(void *sk, __u32 *cookie);
 
 int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr);
index ad704c757bb4a6e48c685fe0478ce6525b08a3ab..96e70ee05a8dde068622a59e9db850f44110980c 100644 (file)
@@ -13,7 +13,7 @@ static const struct sock_diag_handler *sock_diag_handlers[AF_MAX];
 static int (*inet_rcv_compat)(struct sk_buff *skb, struct nlmsghdr *nlh);
 static DEFINE_MUTEX(sock_diag_table_mutex);
 
-int sock_diag_check_cookie(void *sk, __u32 *cookie)
+int sock_diag_check_cookie(void *sk, const __u32 *cookie)
 {
        if ((cookie[0] != INET_DIAG_NOCOOKIE ||
             cookie[1] != INET_DIAG_NOCOOKIE) &&