From b7c4949184fc1af87bb6514079867025d2372588 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 6 Feb 2020 16:24:22 +0200 Subject: [PATCH] tools: Add coccinelle script to replace all bgp_flag_* functions Signed-off-by: Donatas Abraitis --- .../coccinelle/replace_bgp_flag_functions.cocci | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/coccinelle/replace_bgp_flag_functions.cocci diff --git a/scripts/coccinelle/replace_bgp_flag_functions.cocci b/scripts/coccinelle/replace_bgp_flag_functions.cocci new file mode 100644 index 0000000000..3064fc0267 --- /dev/null +++ b/scripts/coccinelle/replace_bgp_flag_functions.cocci @@ -0,0 +1,14 @@ +@@ +expression e1, e2; +@@ + +( +- bgp_flag_check(e1, e2) ++ CHECK_FLAG(e1->flags, e2) +| +- bgp_flag_set(e1, e2) ++ SET_FLAG(e1->flags, e2) +| +- bgp_flag_unset(e1, e2) ++ UNSET_FLAG(e1->flags, e2) +) -- 2.39.5