From a7717ae4f9c8c2e09f50c3dd05c38682b9b6383c Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sun, 24 Jul 2011 11:10:37 -0500 Subject: [PATCH] Use heim_assert() instead of assert() --- lib/kadm5/context_s.c | 3 ++- lib/kadm5/kadm5_locl.h | 1 + lib/kadm5/log.c | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/kadm5/context_s.c b/lib/kadm5/context_s.c index a6bd7b887..d5b9d4f25 100644 --- a/lib/kadm5/context_s.c +++ b/lib/kadm5/context_s.c @@ -47,7 +47,8 @@ kadm5_s_lock(void *server_handle) * open if the DB was locked with a prior call to kadm5_lock(), * so if it's open here that must be because the DB is locked. */ - assert( context->db->lock_count > 0 ); + heim_assert(context->db->lock_count > 0, + "Internal error in tracking HDB locks"); return KADM5_ALREADY_LOCKED; } diff --git a/lib/kadm5/kadm5_locl.h b/lib/kadm5/kadm5_locl.h index 68b6a5ebf..11c3ed1bd 100644 --- a/lib/kadm5/kadm5_locl.h +++ b/lib/kadm5/kadm5_locl.h @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/lib/kadm5/log.c b/lib/kadm5/log.c index b70962f5e..76084b09a 100644 --- a/lib/kadm5/log.c +++ b/lib/kadm5/log.c @@ -717,10 +717,10 @@ kadm5_log_replay_modify (kadm5_server_context *context, * choice_HDB_extension_data_hist_keys); * * Maybe we should do this here anyways, wasteful as it would - * be, as a defensive programming measure? For now we stick an - * assert(). + * be, as a defensive programming measure? For now we heim_assert(). */ - assert( (mask & KADM5_TL_DATA) ); + heim_assert((mask & KADM5_TL_DATA), + "Wouldn't log and replay key history"); for (i = 0; i < ent.entry.keys.len; ++i) free_Key(&ent.entry.keys.val[i]);