frr/tools/coccinelle
Donatas Abraitis fd283bd250 bgpd: Use route_map_result_t for route_map_apply() as return type
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-09-20 10:45:02 +03:00
..
__func__.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
alloc_cast.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
argv_find.cocci tools: Catch more argv_find() when not checked properly 2022-05-12 10:09:42 +03:00
array_size.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
badty.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
badzero.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
bool_assignment.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
bool_expression.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
bool_function.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
bool_function_type.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
boolconv.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
boolinit.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
boolreturn.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
cast_to_larger_sizes.cocci tools: Add coccinelle script to catch typecasts to larger sizes 2020-04-07 18:03:57 +03:00
cond_no_effect.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
ctype_cast.cocci *: fix ctype (isalpha & co.) casts 2019-08-06 16:54:52 +02:00
deref_null.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
double_lock.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
doublebitand.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
doubleinit.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
doubletest.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
frr_with_mutex.cocci lib: add frr_with_mutex() block-wrapper 2019-09-03 17:15:17 +02:00
hash_compare_null_values_check.cocci tools: Add coccinelle script for hash compare functions NULL values 2021-07-13 08:49:38 +03:00
hash_const.cocci lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
ifaddr.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
ifnullxfree.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
int_to_bool_function.cocci tools: Convert type int functions to bool where possible 2020-03-21 14:58:21 +02:00
itnull.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
json_object_add_camel_case.cocci tools: Check against capital first in JSON keys 2022-02-03 10:48:06 +02:00
json_object_string_addf_inet_ntop.cocci tools: Replace prefix2str for JSON to %pFX 2021-11-25 17:26:26 +02:00
json_object_string_addf_prefix2str.cocci tools: Replace prefix2str for JSON to %pFX 2021-11-25 17:26:26 +02:00
memset.cocci tools: Add coccinelle script to catch memset/memcpy wrong usage 2022-05-11 13:12:22 +03:00
mini_lock.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
nb-cbs.cocci *: change the signature of the northbound callbacks to be more flexible 2020-04-23 10:14:32 -03:00
noderef.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
README.md tools: add cocci patch for thread cancel api changes 2020-10-23 12:16:52 -04:00
replace-strncpy.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
replace_bgp_flag_functions.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
return_without_parenthesis.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
returnvar.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
route_map_apply.cocci bgpd: Use route_map_result_t for route_map_apply() as return type 2022-09-20 10:45:02 +03:00
s_addr_0_to_INADDR_ANY.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
same_type_casting.cocci tools: Add coccinelle script to catch typecasts to same type 2020-04-08 17:15:10 +03:00
semicolon.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
shorthand_operator.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
strncpy_truncation.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
struct_thread_double_pointer.cocci tools: Catch double pointer of struct thread towards thread_add_* 2021-10-07 16:25:03 +03:00
struct_thread_null.cocci tools: Add coccinelle script to catch thread to NULL assignments 2021-10-04 19:29:06 +03:00
test_after_assert.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
thread_cancel_api.cocci tools: add cocci patch for thread cancel api changes 2020-10-23 12:16:52 -04:00
unsigned_lesser_than_zero.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
void_no_return.cocci tools: Move scripts/coccinelle to tools/coccinelle 2020-03-10 11:41:09 +02:00
vty_check.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
vty_index.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
vty_json.cocci tools: Handle new lines for json_object_to_json_string_ext() 2022-01-31 15:34:24 +02:00
xcalloc-simple.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
xcalloc-xmalloc.cocci tools: Add coccinelle script for checking against XMALLOC/XCALLOC NULLs 2021-06-29 22:27:50 +03:00
xfree.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
xfreeaddr.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
xmalloc_returnval.cocci tools: add coccinelle spatches 2019-02-26 17:40:40 +00:00
zlog_no_newline.cocci tools: Add coccinelle script to catch \n or \r at the end of zlog_* 2021-09-27 15:21:52 +03:00
zprivs.cocci *: frr_elevate_privs -> frr_with_privs 2019-09-03 17:18:35 +02:00

Coccinelle patches

This collection of coccinelle patches represents some of the broader, codebase-wide changes that have been made. If you maintain a fork of FRR and find that your codebase needs to be updated to align with these changes, the coccinelle tool should help you make that update.

The coccinelle tool is documented at: https://coccinelle.gitlabpages.inria.fr/website/

To run a coccinelle patch script:

spatch --sp-file tools/coccinelle/semicolon.cocci zebra/*.c