rem: iterator->base_path_id = -1; iterator->base_dir = iterator->cur_dir = NULL; iterator->err = B_NO_ERROR; iterator->module_pos = 0;
add: for (i = 0; i < NUM_MODULE_PATHS; i++) { const char *p;  if (modules_disable_user_addons && i >= USER_MODULE_PATHS) break;  strcpy(path, gModulePaths[i]); if (prefix && *prefix) { strcat(path, "/"); strlcat(path, prefix, sizeof(path)); }  p = strdup(path); if (p == NULL) {  continue; } iterator_push_path_on_stack(iterator, p); }
context: open_module_list(const char *prefix){	module_iterator *iterator;	TRACE(("open_module_list(prefix = %s)\n", prefix));	iterator = (module_iterator *)malloc(sizeof( module_iterator));	if (!iterator)		return NULL;	// ToDo: possibly, the prefix don't have to be copied, just referenced	iterator->prefix = strdup(prefix);	if (iterator->prefix == NULL) {		free(iterator);		return NULL;	}	iterator->base_path_id = -1;	iterator->base_dir = iterator->cur_dir = NULL;	iterator->err = B_NO_ERROR;	iterator->module_pos = 0;	return (void *)iterator;}