snprintf(pathname, RA_MAX_NAME_LENGTH, "%s%s",
snprintf(pathname, RA_MAX_NAME_LENGTH, "%s/%s",
get_ra_pathname(const char* class_path, const char* type, const char* provider,		char pathname[]){	char* type_dup;	char* base_name;	type_dup = strndup(type, RA_MAX_NAME_LENGTH);	base_name = basename(type_dup);	if ( strncmp(type, base_name, RA_MAX_NAME_LENGTH) == 0 ) {		/*the type does not include path*/		if (provider) {			snprintf(pathname, RA_MAX_NAME_LENGTH, "%s%s/%s",				class_path, provider, type);		}else{			snprintf(pathname, RA_MAX_NAME_LENGTH, "%s%s",				class_path,type);		}	}else{		/*the type includes path, just copy it to pathname*/		strncpy(pathname, type, RA_MAX_NAME_LENGTH);	}	free(type_dup);}