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); |
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 |
|
|
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 |
|
{ |
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]); |