rem: search_for_mf_hdr( msg , error );
context: int add_maxfwd_header( struct sip_msg* msg , unsigned int val ){	unsigned int  len;	char          *buf;	struct lump*  anchor;	search_for_mf_hdr( msg , error );	/*did we found the header after parsing?*/	if ( msg->maxforwards )	{		LOG( L_ERR , "ERROR: add_maxfwd_header :"		  " MAX_FORWARDS header already exists (%p) !\n",msg->maxforwards);		goto error;	}	/* constructing the header */	len = 14 /*"MAX-FORWARDS: "*/+ CRLF_LEN + 3/*val max on 3 digits*/;	buf = (char*)pkg_malloc( len );	if (!buf) {		LOG(L_ERR, "ERROR : add_maxfwd_header : "		  "No memory left\n");		return -1;	}	memcpy( buf , "Max-Forwards: ", 14 );	len = 14 ;	len += btostr( buf+len , val );	memcpy( buf+len , CRLF , CRLF_LEN );	len +=CRLF_LEN;	/*inserts the header at the begining of the message*/	anchor = anchor_lump(&msg->add_rm, msg->headers->name.s - msg->buf, 0 , 0);	if (anchor == 0) {		LOG(L_ERR, "ERROR: add_maxfwd_header :"		   " Error, can't get anchor\n");		goto error1;	}	if (insert_new_lump_before(anchor, buf, len, 0) == 0) {		LOG(L_ERR, "ERROR: add_maxfwd_header : "		    "Error, can't insert MAX-FORWARDS\n");		goto error1;	}	store_mf_hdr_value( msg , val );	return 1;error1:	pkg_free( buf );error:	return -1;}