ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/modules.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/modules.c (file contents):
Revision 3234 by michael, Tue Feb 25 11:50:53 2014 UTC vs.
Revision 3235 by michael, Sat Mar 29 19:34:16 2014 UTC

# Line 259 | Line 259 | add_conf_module(const char *name)
259   void
260   mod_clear_paths(void)
261   {
262 <  dlink_node *ptr = NULL, *next_ptr = NULL;
262 >  dlink_node *ptr = NULL, *ptr_next = NULL;
263  
264 <  DLINK_FOREACH_SAFE(ptr, next_ptr, modules_path.head)
264 >  DLINK_FOREACH_SAFE(ptr, ptr_next, modules_path.head)
265    {
266      dlinkDelete(ptr, &modules_path);
267      MyFree(ptr->data);
268    }
269  
270 <  DLINK_FOREACH_SAFE(ptr, next_ptr, modules_conf.head)
270 >  DLINK_FOREACH_SAFE(ptr, ptr_next, modules_conf.head)
271    {
272      dlinkDelete(ptr, &modules_conf);
273      MyFree(ptr->data);
# Line 289 | Line 289 | findmodule_byname(const char *name)
289    {
290      struct module *modp = ptr->data;
291  
292 <    if (strcmp(modp->name, name) == 0)
292 >    if (!strcmp(modp->name, name))
293        return modp;
294    }
295  
# Line 316 | Line 316 | load_all_modules(int warn)
316      return;
317    }
318  
319 <  while ((ldirent = readdir(system_module_dir)) != NULL)
319 >  while ((ldirent = readdir(system_module_dir)))
320    {
321      if (modules_valid_suffix(ldirent->d_name))
322      {
# Line 359 | Line 359 | void
359   load_core_modules(int warn)
360   {
361    char module_name[HYB_PATH_MAX + 1];
362  int i = 0;
362  
363 <  for (; core_module_table[i]; ++i)
363 >  for (unsigned int i = 0; core_module_table[i]; ++i)
364    {
365      snprintf(module_name, sizeof(module_name), "%s%s",
366               MODPATH, core_module_table[i]);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)