char subdir[FILENAME_MAX+1];
get_resource_list(GList ** rsc_info){	struct dirent **namelist;	GList* item;	int file_num;	if ( rsc_info == NULL ) {		cl_log(LOG_ERR, "Parameter error: get_resource_list");		return -2;	}	if ( *rsc_info != NULL ) {		cl_log(LOG_ERR, "Parameter error: get_resource_list."\			"will cause memory leak.");		*rsc_info = NULL;	}	file_num = scandir(RA_PATH, &namelist, 0, alphasort);	if (file_num < 0) {		return -2;	}	char subdir[FILENAME_MAX+1];	while (file_num--) {		GList* ra_subdir = NULL;		if ((DT_DIR != namelist[file_num]->d_type) || 		    ('.' == namelist[file_num]->d_name[0])) {			free(namelist[file_num]);			continue;		}		snprintf(subdir,FILENAME_MAX,"%s/%s",			 RA_PATH, namelist[file_num]->d_name);			 		get_runnable_list(subdir,&ra_subdir);		merge_string_list(rsc_info,ra_subdir);		while (NULL != (item = g_list_first(ra_subdir))) {			ra_subdir = g_list_remove_link(ra_subdir, item);			g_free(item->data);			g_list_free_1(item);		}		free(namelist[file_num]);	}	free(namelist);				return 0;}