node_rh->weight += cons->weight;  /* detect wrap-around */ if(old_weight >= 0) { if(cons->weight >= 0 && node_rh->weight < 0) { node_rh->weight = INFINITY; }  } else if(cons->weight <= 0 && node_rh->weight > 0) { node_rh->weight = -INFINITY; }  /* detect +/- INFINITY */ if(node_rh->weight >= INFINITY) { node_rh->weight = INFINITY; node_rh->fixed = TRUE;  } else if(node_rh->weight <= -INFINITY) { node_rh->weight = -INFINITY; node_rh->fixed = TRUE; } 
node_rh->weight = merge_weights(node_rh->weight, cons->weight); 
native_update_node_weight(resource_t *rsc, rsc_to_node_t *cons,			  const char *id, GListPtr nodes){	float old_weight = 0.0;	node_t *node_rh = NULL;	native_variant_data_t *native_data = NULL;	get_native_variant_data(native_data, rsc);	node_rh = pe_find_node(native_data->allowed_nodes, id);	if(node_rh == NULL) {		crm_err("Node not found - cant update");		return;	}	if(node_rh->weight >= INFINITY && cons->weight == -INFINITY) {		crm_err("Constraint %s mixes +/- INFINITY", cons->id);			} else if(node_rh->weight <= -INFINITY && cons->weight == INFINITY) {		crm_err("Constraint %s mixes +/- INFINITY", cons->id);	}	if(node_rh->fixed) {		/* warning */		crm_debug("Constraint %s is irrelevant as the"			 " weight of node %s is fixed as %f.",			 cons->id,			 node_rh->details->uname,			 node_rh->weight);		return;	}	if(cons->weight != INFINITY && cons->weight != -INFINITY) {		crm_verbose("Constraint %s (%f): node %s weight %f.",			    cons->id,			    cons->weight,			    node_rh->details->uname,			    node_rh->weight);	} else if(cons->weight == -INFINITY) {		crm_verbose("Constraint %s (-INFINITY): node %s weight %f.",			    cons->id,			    node_rh->details->uname,			    node_rh->weight);	} else {		crm_verbose("Constraint %s (+INFINITY): node %s weight %f.",			    cons->id,			    node_rh->details->uname,			    node_rh->weight);	}			node_rh->weight += cons->weight;	/* detect wrap-around */	if(old_weight >= 0) {		if(cons->weight >= 0 && node_rh->weight < 0) {			node_rh->weight = INFINITY;		}			} else if(cons->weight <= 0 && node_rh->weight > 0) {		node_rh->weight = -INFINITY;	}	/* detect +/- INFINITY */	if(node_rh->weight >= INFINITY) {		node_rh->weight = INFINITY;		node_rh->fixed = TRUE;			} else if(node_rh->weight <= -INFINITY) {		node_rh->weight = -INFINITY;		node_rh->fixed = TRUE;	}	if(node_rh->weight < 0) {		node_rh->fixed = TRUE;	}	crm_devel_action(print_node("Updated", node_rh, FALSE));	return;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/7d052567cde9549e0fa1be5b3bedf8a192831fdb/native.c/buggy/crm/pengine/native.c