From 0787b27b4fe03f1d2c99e92159f275a50198839f Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 17 Aug 2020 19:26:45 -0400 Subject: [PATCH] fix: correct module db errors --- runtime/include/module_database.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/include/module_database.h b/runtime/include/module_database.h index 8336a4e..0b4556d 100644 --- a/runtime/include/module_database.h +++ b/runtime/include/module_database.h @@ -1,6 +1,7 @@ #pragma once -#include +#include "debuglog.h" +#include "module.h" struct module *module_database_find_by_name(char *name); struct module *module_database_find_by_socket_descriptor(int socket_descriptor); @@ -28,7 +29,7 @@ module_database_add(struct module *module) int f = __sync_fetch_and_add(&module_database_free_offset, 1); if (module_database_free_offset > MODULE_MAX_MODULE_COUNT) { - __sync_fetch_and_subtract(&module_database_free_offset, 1); + __sync_fetch_and_sub(&module_database_free_offset, 1); goto err_no_space; }