summaryrefslogtreecommitdiff
path: root/src/modules.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-12-30 17:38:35 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-12-30 17:38:35 +0000
commit2a8bc51cb15fd601a5c16d00be7c526150a28b91 (patch)
tree5747b44cef7a900bf3886fae8e6e39864fcbb972 /src/modules.c
parent35096dbb8ce8ea359a0e929f3312cf1299c8ab20 (diff)
BUILD : 1.7.6 (516) BUGS : 261 NOTES : This should be it finally! The moduleAddData function was using the old head to append/prepend the new moduleData to, but it had to use the new head. Thanks to DrStein for finding the cause! :)
git-svn-id: svn://svn.anope.org/anope/trunk@516 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@370 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules.c')
-rw-r--r--src/modules.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/modules.c b/src/modules.c
index 4fa4c2c77..ddaa609d7 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -1825,7 +1825,6 @@ int moduleAddData(ModuleData ** md, char *key, char *value)
*/
char *mod_name = sstrdup(mod_current_module_name);
ModuleData *newData = NULL;
- ModuleData *tmp = *md;
if (!key || !value) {
alog("A module tried to use ModuleAddData() with one ore more NULL arguments... returning");
@@ -1850,11 +1849,7 @@ int moduleAddData(ModuleData ** md, char *key, char *value)
newData->moduleName = sstrdup(mod_name);
newData->key = sstrdup(key);
newData->value = sstrdup(value);
- if (tmp) {
- newData->next = tmp;
- } else {
- newData->next = NULL;
- }
+ newData->next = *md;
*md = newData;
free(mod_name);