Skip to content

Commit

Permalink
const issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Sep 7, 2017
1 parent 8739309 commit 47eb429
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/util/dict.c
Expand Up @@ -4316,14 +4316,20 @@ void fr_dict_verify(char const *file, int line, fr_dict_attr_t const *da)
{ {
int i; int i;
fr_dict_attr_t const *da_p; fr_dict_attr_t const *da_p;
#ifndef NDEBUG
fr_dict_attr_t *tmp;
#endif


if (!da) { if (!da) {
FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: fr_dict_attr_t pointer was NULL", file, line); FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: fr_dict_attr_t pointer was NULL", file, line);


if (!fr_cond_assert(0)) fr_exit_now(1); if (!fr_cond_assert(0)) fr_exit_now(1);
} }


(void) talloc_get_type_abort(da, fr_dict_attr_t); #ifndef NDEBUG
memcpy(&tmp, &da, sizeof(da));
(void) talloc_get_type_abort(tmp, fr_dict_attr_t);
#endif


if ((!da->flags.is_root) && (da->depth == 0)) { if ((!da->flags.is_root) && (da->depth == 0)) {
FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: fr_dict_attr_t %s vendor: %i, attr %i: " FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: fr_dict_attr_t %s vendor: %i, attr %i: "
Expand Down

0 comments on commit 47eb429

Please sign in to comment.