Thread (3 messages) 3 messages, 3 authors, 2016-09-22

Re: [PATCH iproute2 net-next] tc: m_vlan: Add vlan modify action

flat view

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2016-09-22 16:04:55

On Thu, 22 Sep 2016 12:31:10 +0300
Shmulik Ladkani [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+
+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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help