From 6cb643f4f9f7f558ce96c5b0087fd28c8a40c6db Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 20 Mar 2016 05:54:48 -0500 Subject: [PATCH] ircd: modules: use LT_MODULE_EXT more consistently --- ircd/modules.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ircd/modules.c b/ircd/modules.c index 5638d150..f1faf5d8 100644 --- a/ircd/modules.c +++ b/ircd/modules.c @@ -274,8 +274,8 @@ load_core_modules(int warn) for (i = 0; core_module_table[i]; i++) { - snprintf(module_name, sizeof(module_name), "%s/%s", MODPATH, - core_module_table[i]); + snprintf(module_name, sizeof(module_name), "%s/%s%s", MODPATH, + core_module_table[i], LT_MODULE_EXT); if(load_a_module(module_name, warn, MAPI_ORIGIN_CORE, 1) == -1) { @@ -299,7 +299,6 @@ load_one_module(const char *path, int origin, int coremodule) char modpath[PATH_MAX]; rb_dlink_node *pathst; const char *mpath; - struct stat statbuf; if (server_state_foreground) @@ -315,7 +314,7 @@ load_one_module(const char *path, int origin, int coremodule) { mpath = pathst->data; - snprintf(modpath, sizeof(modpath), "%s/%s", mpath, path); + snprintf(modpath, sizeof(modpath), "%s/%s%s", mpath, path, LT_MODULE_EXT); if((strstr(modpath, "../") == NULL) && (strstr(modpath, "/..") == NULL)) { if(stat(modpath, &statbuf) == 0)