]> jfr.im git - solanum.git/blobdiff - src/modules.c
Don't shadow the name "index".
[solanum.git] / src / modules.c
index ba56c96553c166e8a8b6ffbd3ce5ccc8bed7613c..8165b2c41d35ccb6d7668534d5bb1eaee6a4693e 100644 (file)
@@ -57,6 +57,7 @@
 struct module **modlist = NULL;
 
 static const char *core_module_table[] = {
+       "m_ban",
        "m_die",
        "m_error",
        "m_join",
@@ -257,7 +258,7 @@ load_all_modules(int warn)
 void
 load_core_modules(int warn)
 {
-       char module_name[MAXPATHLEN];
+       char module_name[PATH_MAX];
        int i;
 
 
@@ -285,7 +286,7 @@ load_core_modules(int warn)
 int
 load_one_module(const char *path, int coremodule)
 {
-       char modpath[MAXPATHLEN];
+       char modpath[PATH_MAX];
        rb_dlink_node *pathst;
        struct module_path *mpath;
 
@@ -737,7 +738,7 @@ unload_one_module(const char *name, int warn)
        dlclose(modlist[modindex]->address);
 
        rb_free(modlist[modindex]->name);
-       memcpy(&modlist[modindex], &modlist[modindex + 1],
+       memmove(&modlist[modindex], &modlist[modindex + 1],
               sizeof(struct module) * ((num_mods - 1) - modindex));
 
        if(num_mods != 0)