Skip to content

Commit

Permalink
try to satisfy clang scan, too
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed May 11, 2024
1 parent 610693e commit ae174ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/server/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static void mlg_data_del(module_instance_t *mi)
mlg_module_instance_t *mlg_mi = (mlg_module_instance_t *)talloc_get_type_abort(mi, module_instance_t);

if (!fr_heap_entry_inserted(mlg_mi->inst_idx)) return;

if (fr_heap_extract(&mlg_index, mi) == 0) return;

fr_assert(0);
Expand Down Expand Up @@ -683,6 +683,11 @@ static int8_t module_instance_name_cmp(void const *one, void const *two)
int a_depth = 0, b_depth = 0;
int ret;

#ifdef STATIC_ANALYZER
if (!fr_cond_assert(a)) return +1;
if (!fr_cond_assert(b)) return -1;
#endif

/*
* Sort by depth, so for tree walking we start
* at the shallowest node, and finish with
Expand Down

0 comments on commit ae174ae

Please sign in to comment.