fixstyle, now with upstream .clang-* files
This commit is contained in:
28
.clang-format
Normal file
28
.clang-format
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Minimal clang-format version is 8
|
||||||
|
|
||||||
|
BasedOnStyle: GNU
|
||||||
|
UseTab: Always
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
SortIncludes: false
|
||||||
|
AlignConsecutiveMacros: true
|
||||||
|
BreakBeforeTernaryOperators: false
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
ContinuationIndentWidth: 2
|
||||||
|
|
||||||
|
ForEachMacros:
|
||||||
|
- 'clib_bitmap_foreach'
|
||||||
|
- 'pool_foreach'
|
||||||
|
- 'pool_foreach_index'
|
||||||
|
- 'vec_foreach'
|
||||||
|
- 'vec_foreach_backwards'
|
||||||
|
- 'vec_foreach_index'
|
||||||
|
- 'vec_foreach_index_backwards'
|
||||||
|
- 'vlib_foreach_rx_tx'
|
||||||
|
- 'foreach_vlib_main'
|
||||||
|
|
||||||
|
StatementMacros:
|
||||||
|
- 'CLIB_MULTIARCH_FN'
|
||||||
|
- 'VLIB_NODE_FN'
|
||||||
|
- 'VNET_DEVICE_CLASS_TX_FN'
|
||||||
|
- '__clib_section'
|
||||||
|
- '__clib_aligned'
|
8
.clang-tidy
Normal file
8
.clang-tidy
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Checks: "-*,\
|
||||||
|
misc-*,\
|
||||||
|
bugprone-*,\
|
||||||
|
-bugprone-reserved-identifier,\
|
||||||
|
-performance-*,\
|
||||||
|
clang-analyzer-*,\
|
||||||
|
-clang-analyzer-valist.Uninitialized,\
|
||||||
|
"
|
@ -35,7 +35,9 @@
|
|||||||
/* walk function to copy forward all sw interface link state flags into
|
/* walk function to copy forward all sw interface link state flags into
|
||||||
* their counterpart LIP link state.
|
* their counterpart LIP link state.
|
||||||
*/
|
*/
|
||||||
static walk_rc_t lcp_itf_pair_walk_sync_state_cb(index_t lipi, void *ctx) {
|
static walk_rc_t
|
||||||
|
lcp_itf_pair_walk_sync_state_cb (index_t lipi, void *ctx)
|
||||||
|
{
|
||||||
lcp_itf_pair_t *lip;
|
lcp_itf_pair_t *lip;
|
||||||
vnet_sw_interface_t *phy;
|
vnet_sw_interface_t *phy;
|
||||||
|
|
||||||
@ -48,8 +50,8 @@ static walk_rc_t lcp_itf_pair_walk_sync_state_cb(index_t lipi, void *ctx) {
|
|||||||
if (!phy)
|
if (!phy)
|
||||||
return WALK_CONTINUE;
|
return WALK_CONTINUE;
|
||||||
|
|
||||||
LCP_ITF_PAIR_DBG("walk_sync_state: lip %U flags %u", format_lcp_itf_pair, lip,
|
LCP_ITF_PAIR_DBG ("walk_sync_state: lip %U flags %u", format_lcp_itf_pair,
|
||||||
phy->flags);
|
lip, phy->flags);
|
||||||
lcp_itf_set_link_state (lip, (phy->flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP));
|
lcp_itf_set_link_state (lip, (phy->flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP));
|
||||||
|
|
||||||
return WALK_CONTINUE;
|
return WALK_CONTINUE;
|
||||||
|
Reference in New Issue
Block a user