Skip to content
Browse files

const issues

  • Loading branch information...
alandekok committed Sep 7, 2017
1 parent 8739309 commit 47eb4298d1f6bb5c0ac9fe99a539e862044c5df6
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/lib/util/dict.c
@@ -4316,14 +4316,20 @@ void fr_dict_verify(char const *file, int line, fr_dict_attr_t const *da)
int i;
fr_dict_attr_t const *da_p;
#ifndef NDEBUG
fr_dict_attr_t *tmp;

if (!da) {
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);

(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);

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: "

0 comments on commit 47eb429

Please sign in to comment.
You can’t perform that action at this time.