/* ... Check if the module is loaded ....................................... */
-static U32 indirect_loaded = 0;
+static I32 indirect_loaded = 0;
#if I_THREADSAFE
int global_setup = 0;
if (indirect_loaded <= 0) {
+ assert(indirect_loaded == 0);
assert(!indirect_loaded_cxts);
indirect_loaded_cxts = ptable_new();
global_setup = 1;
ptable_loaded_delete(indirect_loaded_cxts, cxt);
--indirect_loaded;
} else if (indirect_loaded_cxts) {
+ assert(indirect_loaded == 1);
ptable_loaded_free(indirect_loaded_cxts);
indirect_loaded_cxts = NULL;
indirect_loaded = 0;