From 4e1bfbf1ad5c21b90155b60d7485dd39ba93d77d Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 25 Feb 2014 11:51:04 +0000 Subject: - modules.c:load_one_module(): renamed variables to make less confusing git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@3032 82007160-df01-0410-b94d-b575c5fd34c7 --- src/modules.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/modules.c b/src/modules.c index 227fc21..a2a19b3 100644 --- a/src/modules.c +++ b/src/modules.c @@ -383,30 +383,30 @@ load_core_modules(int warn) * side effects - module is loaded if found. */ int -load_one_module(const char *path) +load_one_module(const char *name) { dlink_node *ptr = NULL; - char modpath[HYB_PATH_MAX + 1]; + char path[HYB_PATH_MAX + 1]; struct stat statbuf; DLINK_FOREACH(ptr, modules_path.head) { const struct module_path *mpath = ptr->data; - snprintf(modpath, sizeof(modpath), "%s/%s", mpath->path, path); + snprintf(path, sizeof(path), "%s/%s", mpath->path, name); - if (!modules_valid_suffix(path)) + if (!modules_valid_suffix(name)) continue; - if (strstr(modpath, "../") == NULL && - strstr(modpath, "/..") == NULL) - if (!stat(modpath, &statbuf)) + if (strstr(path, "../") == NULL && + strstr(path, "/..") == NULL) + if (!stat(path, &statbuf)) if (S_ISREG(statbuf.st_mode)) /* Regular files only please */ - return load_a_module(modpath, 1); + return load_a_module(path, 1); } sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "Cannot locate module %s", path); - ilog(LOG_TYPE_IRCD, "Cannot locate module %s", path); + "Cannot locate module %s", name); + ilog(LOG_TYPE_IRCD, "Cannot locate module %s", name); return -1; } -- cgit