From 0271f4a48d3d5fc00358f7be75495de289075f8a Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 18 Mar 2020 22:43:52 -0400 Subject: [PATCH] chore: fix consistent delimiter in module_database --- runtime/include/module_database.h | 4 ++-- runtime/src/module_database.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/include/module_database.h b/runtime/include/module_database.h index 62a0fb9..0e7f4a3 100644 --- a/runtime/include/module_database.h +++ b/runtime/include/module_database.h @@ -7,7 +7,7 @@ struct module *module_database__find_by_name(char *name); struct module *module_database__find_by_socket_descriptor(int socket_descriptor); extern struct module *module_database[]; -extern int module_database_free_offset; +extern int module_database__free_offset; /** * Adds a module to the in-memory module DB @@ -21,7 +21,7 @@ module_database__add(struct module *module) assert(module->socket_descriptor == -1); // __sync_fetch_and_add is provided by GCC - int f = __sync_fetch_and_add(&module_database_free_offset, 1); + int f = __sync_fetch_and_add(&module_database__free_offset, 1); assert(f < MODULE__MAX_MODULE_COUNT); module_database[f] = module; diff --git a/runtime/src/module_database.c b/runtime/src/module_database.c index 3d0ae7b..1cbb384 100644 --- a/runtime/src/module_database.c +++ b/runtime/src/module_database.c @@ -8,7 +8,7 @@ // In-memory representation of all active modules struct module *module_database[MODULE__MAX_MODULE_COUNT] = { NULL }; // First free in module -int module_database_free_offset = 0; +int module_database__free_offset = 0; /** * Given a name, find the associated module @@ -18,7 +18,7 @@ int module_database_free_offset = 0; struct module * module_database__find_by_name(char *name) { - int f = module_database_free_offset; + int f = module_database__free_offset; for (int i = 0; i < f; i++) { assert(module_database[i]); if (strcmp(module_database[i]->name, name) == 0) return module_database[i]; @@ -34,7 +34,7 @@ module_database__find_by_name(char *name) struct module * module_database__find_by_socket_descriptor(int socket_descriptor) { - int f = module_database_free_offset; + int f = module_database__free_offset; for (int i = 0; i < f; i++) { assert(module_database[i]); if (module_database[i]->socket_descriptor == socket_descriptor) return module_database[i];