summaryrefslogtreecommitdiffstats
path: root/.clang-format (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: frr_elevate_privs -> frr_with_privsDavid Lamparter2019-09-031-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: add frr_with_mutex() block-wrapperDavid Lamparter2019-09-031-0/+2
| | | | | | | | | frr_with_mutex(...) { ... } locks and automatically unlocks the listed mutex(es) when the block is exited. This adds a bit of safety against forgetting the unlock in error paths & co. and makes the code a slight bit more readable. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* clang-format: update the ForEachMacros settingRenato Westphal2019-05-211-0/+3
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib: introduce new northbound APIRenato Westphal2018-10-271-0/+3
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib: import new JSON iteration macroRafael Zalamena2018-08-081-0/+1
| | | | | | | Save a few lines when iterating over JSON objects using the new JSON_FOREACH macro. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* ospfd: LSDB_LOOP treat it as a loop.Donald Sharp2018-01-171-0/+2
| | | | | | | | Inform the .clang-format file about LSDB_LOOP and put the proper indentation for this loop into the code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal2017-10-101-0/+2
| | | | | | | | | | This improves code readability and also future-proofs our codebase against new changes in the data structure used to store interfaces. The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but for now only babeld is using it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: use clang's 'ForEachMacros' format style optionRenato Westphal2017-09-151-0/+32
| | | | | | | | | | | | | This fixes the broken indentation of several foreach loops throughout the code. From clang's documentation[1]: ForEachMacros: A vector of macros that should be interpreted as foreach loops instead of as function calls. [1] http://clang.llvm.org/docs/ClangFormatStyleOptions.html Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: add indent control filesreindent-master-beforeDavid Lamparter2017-07-171-0/+25
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>