rem: switch(bind_address->address.af) { case AF_INET: len += bind_address->address_str.len; break;
add: if (_lr && use_fast_cmp) len += MD5_LEN;
context: static char *build_RR(struct sip_msg* _m, int* _l, int _lr){	str user;	int len;	char *rr;	char *p;	struct to_body *from;	struct sip_uri puri;	from=0; /* fool -Wall */	/* calculate length first */		len = RR_PREFIX_LEN;	     /* first try to look at r-uri for a username */	if (parse_uri(_m->first_line.u.request.uri.s, _m->first_line.u.request.uri.len, &puri) < 0) {		LOG(L_ERR, "build_RR: Error while parsing R-URI\n");		return 0;	}		user = puri.user;	/* no username in original uri -- hmm; maybe it is a uri	 * with just host address and username is in a preloaded route,	 * which is now no rewritten r-uri (assumed rewriteFromRoute	 * was called somewhere in script's beginning) 	 */	if (user.len==0 && _m->new_uri.s) {		if (parse_uri(_m->new_uri.s, _m->new_uri.len, &puri) < 0) {			LOG(L_ERR, "build_RR(): Error while parsing new_uri\n");			return 0;		}		user = puri.user;	}	len+=user.len+1 /* '@' */;	switch(bind_address->address.af) {	case AF_INET:		len += bind_address->address_str.len;		break;	case AF_INET6:		len += bind_address->address_str.len + 2;		break;	default:		LOG(L_ERR, "build_RR(): Unsupported PF type: %d\n", bind_address->address.af);	}		if (_lr && use_fast_cmp) {		len+=MD5_LEN;	} 	len+=rr_suffix.len;	if (append_fromtag) {		if (parse_from_header(_m)<0) {			LOG(L_ERR, "build_RR: From parsing failed\n");			return 0;		}		from = (struct to_body*)_m->from->parsed;		if (from->tag_value.s) len += RR_FROMTAG_LEN + from->tag_value.len;	}	len+=_lr ? RR_LR_TERM_LEN : RR_SR_TERM_LEN;	rr = (char*)pkg_malloc(len);	if (!rr) {		LOG(L_ERR, "build_RR: No memory left\n");		return 0;	}	/* fill the buffer now ... */	*_l=len;	p=rr;	memcpy(p, RR_PREFIX, RR_PREFIX_LEN);	p+=RR_PREFIX_LEN;		if (_lr && use_fast_cmp) {		memcpy(p, rr_hash, MD5_LEN);		p+=MD5_LEN;	}	if (user.len) {		memcpy(p, user.s, user.len);		p+=user.len;	}	*p='@';p++;	switch(bind_address->address.af) {	case AF_INET:		memcpy(p, bind_address->address_str.s, bind_address->address_str.len);		printf("!!!! '%.*s'\n", bind_address->address_str.len, bind_address->address_str.s);		p += bind_address->address_str.len;		break;	case AF_INET6:		*p = '[';		p++;		memcpy(p, bind_address->address_str.s, bind_address->address_str.len);		p += bind_address->address_str.len;		*p = ']';		p++;		break;	default:		LOG(L_ERR, "build_RR(): Unsupported PF type: %d\n", bind_address->address.af);	}	memcpy(p, rr_suffix.s, rr_suffix.len);	p += rr_suffix.len;		if (append_fromtag && from->tag_value.s) {		memcpy(p, RR_FROMTAG, RR_FROMTAG_LEN); 		p += RR_FROMTAG_LEN;		memcpy(p, from->tag_value.s, from->tag_value.len);		p += from->tag_value.len;	}	if (_lr) {		memcpy(p, RR_LR_TERM,  RR_LR_TERM_LEN); p+= RR_LR_TERM_LEN;	} else {		memcpy(p, RR_SR_TERM,  RR_SR_TERM_LEN); p+= RR_SR_TERM_LEN;	}		DBG("build_RR(): '%.*s'", len, rr);		return rr;}