a_node_copy->node_id      = a_node.node_id; a_node_copy->node_born_on = a_node.node_born_on; a_node_copy->node_uname   = NULL; 
}  offset = oc_in->m_in_idx; for(lpc = 0; lpc < oc->m_n_in; lpc++) { crm_devel("Copying ccm new node %d", lpc); oc_node_t a_node      = oc_in->m_array[lpc+offset]; oc_node_t *a_node_copy = &(oc_copy->m_array[lpc+offset]); copy_ccm_node(a_node, a_node_copy); 
copy_ccm_oc_data(const oc_ev_membership_t *oc_in) {	int lpc = 0;	int size = 0;	int num_nodes = 0;	oc_ev_membership_t *oc_copy = NULL;	if(oc_in->m_n_member > 0	   && num_nodes < oc_in->m_n_member + oc_in->m_memb_idx) {		num_nodes = oc_in->m_n_member + oc_in->m_memb_idx;		crm_devel("Updated ccm nodes to %d - 1", num_nodes);	}	if(oc_in->m_n_in > 0	   && num_nodes < oc_in->m_n_in + oc_in->m_in_idx) {		num_nodes = oc_in->m_n_in + oc_in->m_in_idx;		crm_devel("Updated ccm nodes to %d - 2", num_nodes);	}	if(oc_in->m_n_out > 0	   && num_nodes < oc_in->m_n_out + oc_in->m_out_idx) {		num_nodes = oc_in->m_n_out + oc_in->m_out_idx;		crm_devel("Updated ccm nodes to %d - 3", num_nodes);	}	/* why 2*??	 * ccm code does it like this so i guess its right...	 */	size = sizeof(oc_ev_membership_t)		+ sizeof(int)		+ 2*num_nodes*sizeof(oc_node_t);	crm_devel("Copying %d ccm nodes", num_nodes);		crm_malloc(oc_copy, size);	oc_copy->m_instance = oc_in->m_instance;	oc_copy->m_n_member = oc_in->m_n_member;	oc_copy->m_memb_idx = oc_in->m_memb_idx;	oc_copy->m_n_out    = oc_in->m_n_out;	oc_copy->m_out_idx  = oc_in->m_out_idx;	oc_copy->m_n_in     = oc_in->m_n_in;	oc_copy->m_in_idx   = oc_in->m_in_idx;	crm_debug("instace=%d, nodes=%d, new=%d, lost=%d n_idx=%d, "		  "new_idx=%d, old_idx=%d",		  oc_in->m_instance,		  oc_in->m_n_member,		  oc_in->m_n_in,		  oc_in->m_n_out,		  oc_in->m_memb_idx,		  oc_in->m_in_idx,		  oc_in->m_out_idx);		for(lpc = 0; lpc < num_nodes; lpc++) {		crm_devel("Copying ccm node %d", lpc);		oc_node_t a_node      = oc_in->m_array[lpc];		oc_node_t *a_node_copy = &(oc_copy->m_array[lpc]);		crm_devel("Copying ccm node %d: id=%d, born=%d, uname=%s",			  lpc, a_node.node_id, a_node.node_born_on,			  a_node.node_uname);				a_node_copy->node_id      = a_node.node_id;		a_node_copy->node_born_on = a_node.node_born_on;			a_node_copy->node_uname   = NULL;				if(a_node.node_uname != NULL) {			a_node_copy->node_uname =				crm_strdup(a_node.node_uname);		} else {			crm_err("Node Id %d had a NULL uname!",				a_node.node_id);		}				crm_devel("Copied ccm node %d: id=%d, born=%d, uname=%s",			  lpc, a_node_copy->node_id, a_node_copy->node_born_on,			  a_node_copy->node_uname);	}		return oc_copy;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/8ab0c4fc279fc0f6f32503b39e89a89f8e6a7f69/utils.c/buggy/crm/crmd/utils.c