From: Guillaume Nault <g.nault@alphalink.fr>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, tom@herbertland.com, jchapman@katalix.com
Subject: Re: [PATCH net] l2tp: fix configuration passed to setup_udp_tunnel_sock()
Date: Wed, 8 Jun 2016 12:35:38 +0200 [thread overview]
Message-ID: <20160608103538.GF1592@alphalink.fr> (raw)
In-Reply-To: <20160607.162017.1294730894994990373.davem@davemloft.net>
On Tue, Jun 07, 2016 at 04:20:17PM -0700, David Miller wrote:
> From: Guillaume Nault <g.nault@alphalink.fr>
> Date: Mon, 6 Jun 2016 13:48:02 +0200
>
> > @@ -1581,7 +1581,7 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32
> > /* Mark socket as an encapsulation socket. See net/ipv4/udp.c */
> > tunnel->encap = encap;
> > if (encap == L2TP_ENCAPTYPE_UDP) {
> > - struct udp_tunnel_sock_cfg udp_cfg;
> > + struct udp_tunnel_sock_cfg udp_cfg = { NULL };
>
> This assumes that the first member of udp_tunnel_sock_cfg is, and will always
> be, a pointer.
>
> You could use a named initializer to make this better, but the cleanest way to
> deal with this is to use an empty initializer "{ }", or just plain memset()
> the thing to zero.
>
Indeed. I'll repost using "{ }" then.
prev parent reply other threads:[~2016-06-08 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 11:48 [PATCH net] l2tp: fix configuration passed to setup_udp_tunnel_sock() Guillaume Nault
2016-06-07 23:20 ` David Miller
2016-06-08 10:35 ` Guillaume Nault [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160608103538.GF1592@alphalink.fr \
--to=g.nault@alphalink.fr \
--cc=davem@davemloft.net \
--cc=jchapman@katalix.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).