Skip to content

Commit

Permalink
Quiet clang scan
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 2, 2017
1 parent 3dcae91 commit cdcd8b3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/dl.c
Expand Up @@ -101,23 +101,27 @@ static int dl_module_sym_init_cmp(void const *one, void const *two)
dl_module_sym_init_t const *a = one;
dl_module_sym_init_t const *b = two;

rad_assert(a && b);

if (a->symbol && !b->symbol) return +1;
if (!b->symbol && a->symbol) return -1;
if (!a->symbol && !b->symbol) return 0;
if (a->symbol && b->symbol) return strcmp(a->symbol, b->symbol);

return strcmp(a->symbol, b->symbol);
return 0;
}

static int dl_module_sym_free_cmp(void const *one, void const *two)
{
dl_module_sym_free_t const *a = one;
dl_module_sym_free_t const *b = two;

rad_assert(a && b);

if (a->symbol && !b->symbol) return +1;
if (!b->symbol && a->symbol) return -1;
if (!a->symbol && !b->symbol) return 0;
if (a->symbol && b->symbol) strcmp(a->symbol, b->symbol);

return strcmp(a->symbol, b->symbol);
return 0;
}

static int dl_module_sym_cmp(void const *one, void const *two)
Expand Down

0 comments on commit cdcd8b3

Please sign in to comment.