rem: rand = random(); new_cell->hash_index = rand % TABLE_ENTRIES ;
add: myrand = rand(); new_cell->hash_index = myrand % TABLE_ENTRIES ;
context: struct cell*  build_cell( struct sip_msg* p_msg ){	struct cell* new_cell;	unsigned int i;	unsigned int rand;	int size;	char *c;	struct ua_client *uac;	/* avoid 'unitialized var use' warning */	rand=0;	/* allocs a new cell */	new_cell = (struct cell*)shm_malloc( sizeof( struct cell ) );	if  ( !new_cell ) {		ser_error=E_OUT_OF_MEM;		return NULL;	}	/* filling with 0 */	memset( new_cell, 0, sizeof( struct cell ) );	/* UAS */	new_cell->uas.response.retr_timer.tg=TG_RT;	new_cell->uas.response.fr_timer.tg=TG_FR;	new_cell->uas.response.fr_timer.payload =		new_cell->uas.response.retr_timer.payload = &(new_cell->uas.response);	new_cell->uas.response.my_T=new_cell;	/* bogdan - debug */	/*fprintf(stderr,"before clone VIA |%.*s|\n",via_len(p_msg->via1),		via_s(p_msg->via1,p_msg));*/	if (p_msg) {		new_cell->uas.request = sip_msg_cloner(p_msg);		if (!new_cell->uas.request)			goto error;	}	/* new_cell->uas.to_tag = &( get_to(new_cell->uas.request)->tag_value ); */	new_cell->uas.response.my_T = new_cell;	/* UAC */	for(i=0;i<MAX_BRANCHES;i++)	{		uac=&new_cell->uac[i];		uac->request.my_T = new_cell;		uac->request.branch = i;		uac->request.fr_timer.tg = TG_FR;		uac->request.retr_timer.tg = TG_RT;		uac->request.retr_timer.payload = 			uac->request.fr_timer.payload =			&uac->request;		uac->local_cancel=uac->request;	}	/* global data for transaction */	if (p_msg) {		new_cell->hash_index = p_msg->hash_index;	} else {		rand = random();		new_cell->hash_index = rand % TABLE_ENTRIES ;	}	new_cell->wait_tl.payload = new_cell;	new_cell->dele_tl.payload = new_cell;	new_cell->relaied_reply_branch   = -1;	/* new_cell->T_canceled = T_UNDEFINED; */	new_cell->wait_tl.tg=TG_WT;	new_cell->dele_tl.tg=TG_DEL;	if (!syn_branch) {		if (p_msg) {			/* char value of a proxied transaction is			   calculated out of header-fileds forming			   transaction key			*/			char_msg_val( p_msg, new_cell->md5 );		} else {			/* char value for a UAC transaction is created			   randomly -- UAC is an originating stateful element 			   which cannot be refreshed, so the value can be			   anything			*/			/* HACK : not long enough */			c=new_cell->md5;			size=MD5_LEN;			memset(c, '0', size );			int2reverse_hex( &c, &size, rand );		}	}	init_cell_lock(  new_cell );	return new_cell;error:	shm_free(new_cell);	return NULL;}