* Re: [PATCH RESEND] 8021q:Add missing statements to switch case in the function, register_vlan_device
[not found] <1457322689-19443-1-git-send-email-xerofoify@gmail.com>
@ 2016-03-07 11:29 ` Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2016-03-07 11:29 UTC (permalink / raw)
To: Nicholas Krause; +Cc: davem, netdev, linux-kernel
On 06.03, Nicholas Krause wrote:
> This adds the proper snprintf and break statement for formatting
> the vlan_net structure pointer, vn's name using snprintf for if
> the switch case, VLAN_NAME_TYPE_PLUS_VID occurs for this particular
> switch statement inside the function, register_vlan_device.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> net/8021q/vlan.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
> index 59555f0..91ef50e 100644
> --- a/net/8021q/vlan.c
> +++ b/net/8021q/vlan.c
> @@ -246,8 +246,11 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
> /* Put our vlan.VID in the name.
> * Name will look like: vlan0005
> */
> + snprintf(name, IFNAMSIZ, "%s%i", real_dev->name, vlan_id);
> + break;
As the comment indicates, the fall-through is intended like this.
> default:
> snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id);
> + break;
> }
>
> new_dev = alloc_netdev(sizeof(struct vlan_dev_priv), name,
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-07 11:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1457322689-19443-1-git-send-email-xerofoify@gmail.com>
2016-03-07 11:29 ` [PATCH RESEND] 8021q:Add missing statements to switch case in the function, register_vlan_device Patrick McHardy
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).