removed unneeded log flushing
This commit is contained in:
parent
76c3d78d46
commit
fa9e0f538a
@ -171,9 +171,10 @@ void moo_fini (moo_t* moo)
|
||||
moo_rbt_walk (&moo->modtab, unload_module, moo); /* unload all modules */
|
||||
moo_rbt_fini (&moo->modtab);
|
||||
|
||||
if (moo->log.ptr)
|
||||
if (moo->log.len > 0)
|
||||
{
|
||||
/* flush pending log messages just in case. */
|
||||
MOO_ASSERT (moo, moo->log.ptr != MOO_NULL);
|
||||
moo->vmprim.log_write (moo, moo->log.last_mask, moo->log.ptr, moo->log.len);
|
||||
}
|
||||
|
||||
@ -183,12 +184,13 @@ void moo_fini (moo_t* moo)
|
||||
if (cb->fini) cb->fini (moo);
|
||||
}
|
||||
|
||||
if (moo->log.ptr)
|
||||
if (moo->log.len > 0)
|
||||
{
|
||||
/* flush pending log message that could be generated by the fini
|
||||
* callbacks. however, the actual logging might not be produced at
|
||||
* this point because one of the callbacks could arrange to stop
|
||||
* logging */
|
||||
MOO_ASSERT (moo, moo->log.ptr != MOO_NULL);
|
||||
moo->vmprim.log_write (moo, moo->log.last_mask, moo->log.ptr, moo->log.len);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user