refactor: small nits

master
Sean McBride 3 years ago
parent c3d0fe375a
commit 03c489498f

@ -45,8 +45,7 @@ has_valid_type(jsmntok_t tok, char *key, jsmntype_t expected_type, const char *j
if (tok.type != expected_type) {
fprintf(stderr, "The value of the key %s should be a %s, was a %s\n", key, jsmn_type(expected_type),
jsmn_type(tok.type));
if (json_buf != NULL)
fprintf(stderr, "String of value %.*s\n", tok.end - tok.start, &json_buf[tok.start]);
if (json_buf != NULL) fprintf(stderr, "Token: %.*s\n", tok.end - tok.start, &json_buf[tok.start]);
return false;
}

@ -213,7 +213,6 @@ module_free_linear_memory(struct module *module, struct wasm_memory *memory)
wasm_memory_pool_add_nolock(&module->pools[worker_thread_idx].memory, memory);
}
struct module_database {
struct module *modules[MODULE_DATABASE_CAPACITY];
size_t count;

@ -56,7 +56,6 @@ err:
* Public Methods
***************************************/
/**
* Module Mega Teardown Function
* Closes the socket and dynamic library, and then frees the module
@ -71,10 +70,12 @@ module_free(struct module *module)
{
if (module == NULL) return;
panic("Unimplemented!\n");
/* TODO: Should allocating routes increment reference */
/* Do not free if we still have oustanding references */
if (module->reference_count) return;
// tcp_server_close(&module->tcp_server);
sledge_abi_symbols_deinit(&module->abi);
free(module);
}

Loading…
Cancel
Save