MXS-2013 Remove all CHK_-macros

This commit is contained in:
Johan Wikman
2018-08-14 15:32:37 +03:00
parent 8fd1648217
commit ae43e4f0f2
19 changed files with 1 additions and 287 deletions

View File

@ -196,178 +196,4 @@ MXS_BEGIN_DECLS
((r) == DCB_REASON_NOT_RESPONDING ? "DCB_REASON_NOT_RESPONDING" : \
"Unknown DCB reason")))))))
#define CHK_MLIST(l) { \
if (l->mlist_first == NULL) { \
ss_info_dassert(l->mlist_nodecount == 0, \
"List head is NULL but element counter is not zero."); \
ss_info_dassert(l->mlist_last == NULL, \
"List head is NULL but tail has node"); \
} else { \
ss_info_dassert(l->mlist_nodecount > 0, \
"List head has node but element counter is not " \
"positive."); \
CHK_MLIST_NODE(l->mlist_first); \
CHK_MLIST_NODE(l->mlist_last); \
} \
if (l->mlist_nodecount == 0) { \
ss_info_dassert(l->mlist_first == NULL, \
"Element counter is zero but head has node"); \
ss_info_dassert(l->mlist_last == NULL, \
"Element counter is zero but tail has node"); \
} \
}
#define CHK_MLIST_NODE(n) { \
}
#define CHK_MLIST_CURSOR(c) { \
ss_info_dassert(c->mlcursor_list != NULL, \
"List cursor doesn't have list"); \
ss_info_dassert(c->mlcursor_pos != NULL || \
(c->mlcursor_pos == NULL && \
c->mlcursor_list->mlist_first == NULL), \
"List cursor doesn't have position"); \
}
#define CHK_SLIST(l) { \
if (l->slist_head == NULL) { \
ss_info_dassert(l->slist_nelems == 0, \
"List head is NULL but element counter is not zero."); \
ss_info_dassert(l->slist_tail == NULL, \
"List head is NULL but tail has node"); \
} else { \
ss_info_dassert(l->slist_nelems > 0, \
"List head has node but element counter is not " \
"positive."); \
CHK_SLIST_NODE(l->slist_head); \
CHK_SLIST_NODE(l->slist_tail); \
} \
if (l->slist_nelems == 0) { \
ss_info_dassert(l->slist_head == NULL, \
"Element counter is zero but head has node"); \
ss_info_dassert(l->slist_tail == NULL, \
"Element counter is zero but tail has node"); \
} \
}
#define CHK_SLIST_NODE(n) { \
}
#define CHK_SLIST_CURSOR(c) { \
ss_info_dassert(c->slcursor_list != NULL, \
"List cursor doesn't have list"); \
ss_info_dassert(c->slcursor_pos != NULL || \
(c->slcursor_pos == NULL && \
c->slcursor_list->slist_head == NULL), \
"List cursor doesn't have position"); \
}
#define CHK_QUERY_TEST(q) { \
}
#define CHK_LOGFILE(lf) { \
ss_info_dassert(lf->lf_filepath != NULL && \
lf->lf_name_prefix != NULL && \
lf->lf_name_suffix != NULL && \
lf->lf_full_file_name != NULL, \
"NULL in name variable\n"); \
}
#define CHK_FILEWRITER(fwr) { \
}
#define CHK_THREAD(thr) { \
}
#define CHK_SIMPLE_MUTEX(sm) { \
}
#define CHK_MESSAGE(mes) { \
}
#define CHK_MLIST_ISLOCKED(l) { \
ss_info_dassert((l.mlist_uselock && l.mlist_islocked) || \
!(l.mlist_uselock || l.mlist_islocked), \
("mlist is not locked although it should.")); \
CHK_MUTEXED_FOR_THR(l.mlist_uselock,l.mlist_rwlock); \
}
#define CHK_MUTEXED_FOR_THR(b,l) { \
ss_info_dassert(!b || \
(b && (l->srw_rwlock_thr == pthread_self())), \
"rwlock is not acquired although it should be."); \
}
#define CHK_FNAMES_CONF(fn) { \
}
#define CHK_LOGMANAGER(lm) { \
}
#define CHK_FILE(f) { \
}
#define CHK_BLOCKBUF(bb) { \
}
#define CHK_HASHTABLE(t) { \
}
#define CHK_MANAGED_LIST(l) { \
}
#define CHK_DCB(d) { \
}
#define CHK_PROTOCOL(p) { \
}
#define CHK_SESSION(s) { \
}
#define CHK_SERVER(s) { \
}
#define CHK_GWBUF(b) { \
ss_info_dassert(((char *)(b)->start <= (char *)(b)->end), \
"gwbuf start has passed the endpoint"); \
}
#define CHK_CLIENT_RSES(r) { \
}
#define CHK_RSES_PROP(p) { \
}
#define CHK_MYSQL_SESCMD(s) { \
}
#define CHK_SESCMD_CUR(c) { \
}
#define CHK_BACKEND(b) { \
}
#define CHK_BACKEND_REF(r) { \
}
#define CHK_PREP_STMT(p) { \
}
#define CHK_PARSING_INFO(p) { \
}
#define CHK_MYSQL_SESSION(s) { \
}
#define CHK_ADMIN_SESSION(s) { \
}
MXS_END_DECLS