Thread (5 messages) flat view 5 messages, 3 authors, 2014-06-24

Re: [net-next PATCH v2 2/2] bridge: netlink dump interface at par with brctl

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2014-06-24 16:10:22

On Tue, 24 Jun 2014 10:15:19 -0400
Jamal Hadi Salim [off-list ref] wrote:
+			if (filter_dev && (!f->dst || f->dst->dev != filter_dev)) {
+				if (filter_dev != dev)
+					goto skip;
+				else {
+					/* 
+					 * !f->dst is a speacial case for bridge
+					 * It means the MAC belongs to the bridge
+					 * Therefore need a little more filtering
+					 * we only want to dump the !f->dst case
+					 */
+					if (f->dst)
+						goto skip;
+				}
After goto, the else is not needed, and it removes one level of already
deep indentation.

		

			if (filter_dev && (!f->dst || f->dst->dev != filter_dev)) {
				if (filter_dev != dev)
					goto skip;
				/* 
				 * !f->dst is a speacial case for bridge
				 * It means the MAC belongs to the bridge
				 * Therefore need a little more filtering
				 * we only want to dump the !f->dst case
				 */
				if (f->dst)
					goto skip;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help