diff --git a/core/my_basic.c b/core/my_basic.c index 5747583..300e80f 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -7870,10 +7870,11 @@ _exit: /* Call the TOSTRING function of a class instance to format it */ static int _format_class_to_string(mb_interpreter_t* s, void** l, _class_t* instance, _object_t* out, bool_t* got_tostr) { int result = MB_FUNC_OK; + _ls_node_t* tsn = 0; mb_assert(s && l && instance && out); - _ls_node_t* tsn = _search_identifier_in_class(s, instance, _CLASS_TOSTRING_FUNC, 0, 0); + tsn = _search_identifier_in_class(s, instance, _CLASS_TOSTRING_FUNC, 0, 0); if(got_tostr) *got_tostr = false; if(tsn) { _object_t* tso = (_object_t*)tsn->data; diff --git a/shell/main.c b/shell/main.c index 0dc9638..b2434a3 100755 --- a/shell/main.c +++ b/shell/main.c @@ -219,7 +219,7 @@ static void _tidy_mem_pool(bool_t force) { return; for(i = 0; i < pool_count; i++) { - while((s = pool[i].stack)) { + while((s = pool[i].stack) != 0) { pool[i].stack = (char*)_POOL_NODE_NEXT(s); _POOL_NODE_FREE(s); } @@ -299,7 +299,7 @@ static void _close_mem_pool(void) { return; for(i = 0; i < pool_count; i++) { - while((s = pool[i].stack)) { + while((s = pool[i].stack) != 0) { pool[i].stack = (char*)_POOL_NODE_NEXT(s); _POOL_NODE_FREE(s); }