diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-02-25 11:51:04 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-02-25 11:51:04 +0000 |
commit | 4e1bfbf1ad5c21b90155b60d7485dd39ba93d77d (patch) | |
tree | 32bf723288e08035c672c908a8ebf327f03bffea /src/modules.c | |
parent | c35075498dfe9605c28fa7ffc0f0ccebee6749f8 (diff) |
- 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
Diffstat (limited to 'src/modules.c')
-rw-r--r-- | src/modules.c | 20 |
1 files changed, 10 insertions, 10 deletions
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; } |