lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160922090504.3eaa5266@xeon-e3>
Date:   Thu, 22 Sep 2016 09:05:04 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Shmulik Ladkani <shmulik.ladkani@...ellosystems.com>
Cc:     <netdev@...r.kernel.org>, Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Shmulik Ladkani <shmulik.ladkani@...il.com>
Subject: Re: [PATCH iproute2 net-next] tc: m_vlan: Add vlan modify action

On Thu, 22 Sep 2016 12:31:10 +0300
Shmulik Ladkani <shmulik.ladkani@...ellosystems.com> wrote:

> +
> +static const char *action_name(int action)
> +{
> +	static const char * const names[] = {
> +		[TCA_VLAN_ACT_POP] = "pop",
> +		[TCA_VLAN_ACT_PUSH] = "push",
> +		[TCA_VLAN_ACT_MODIFY] = "modify",
> +	};
> +	return names[action];
> +}
> +

Why are you wrapping a simple array lookup in a function?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ