int lpc = 0, num_nodes = 0;
int num_nodes = 0;
int native_num_allowed_nodes(resource_t *rsc){	int lpc = 0, num_nodes = 0;	native_variant_data_t *native_data = NULL;	if(rsc->variant == pe_native) {		native_data = (native_variant_data_t *)rsc->variant_opaque;	} else {		crm_err("Resource %s was not a \"native\" variant",			rsc->id);		return 0;	}	if(native_data->color) {		return num_allowed_nodes4color(native_data->color);			} else if(rsc->candidate_colors) {		/* TODO: sort colors first */		color_t *color = g_list_nth_data(rsc->candidate_colors, 0);		return num_allowed_nodes4color(color);	} else {		slist_iter(			this_node, node_t, native_data->allowed_nodes, lpc,			if(this_node->weight < 0) {				continue;			}			num_nodes++;			);	}		return num_nodes;}