[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101018230322.490ac710@nehalam>
Date: Mon, 18 Oct 2010 23:03:22 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: Changli Gao <xiaosuo@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: unix: make some variables constant
On Tue, 19 Oct 2010 13:24:02 +0800
Changli Gao <xiaosuo@...il.com> wrote:
> And since ctl_table.data is initialized later, we don't need to initialize
> the data member of the template variable unix_table.
>
> Signed-off-by: Changli Gao <xiaosuo@...il.com>
> ---
> net/unix/sysctl_net_unix.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
> index 397cffe..1114ccc 100644
> --- a/net/unix/sysctl_net_unix.c
> +++ b/net/unix/sysctl_net_unix.c
> @@ -15,10 +15,9 @@
>
> #include <net/af_unix.h>
>
> -static ctl_table unix_table[] = {
> +const static ctl_table unix_table[] = {
Typical convention is "static const" rather than "const static"
git grep 'const static' | wc -l => 5
git grep 'static const' | wc -l => 18589
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists