netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] ip: merge duplicate if clauses
@ 2024-01-04  0:31 Stephen Hemminger
  2024-01-04 11:18 ` Petr Machata
  2024-01-07 17:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2024-01-04  0:31 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger

The code that handles brief option had two exactly matching
if (filter == AF_PACKET) clauses; merge them

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 ip/ipaddress.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 8197709d172e..e536912fc603 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -929,9 +929,7 @@ static int print_linkinfo_brief(FILE *fp, const char *name,
 						   ifi->ifi_type,
 						   b1, sizeof(b1)));
 		}
-	}
 
-	if (filter.family == AF_PACKET) {
 		print_link_flags(fp, ifi->ifi_flags, m_flag);
 		print_string(PRINT_FP, NULL, "%s", "\n");
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-07 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04  0:31 [PATCH iproute2] ip: merge duplicate if clauses Stephen Hemminger
2024-01-04 11:18 ` Petr Machata
2024-01-07 17:30 ` patchwork-bot+netdevbpf

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).