rem: alias .s = s+1;
add: alias .s = s;
context: static int fixup_db_avp(void** param, int param_no, int allow_scheme){	struct fis_param *sp;	struct db_param  *dbp;	int flags;	str alias;	char *s;	char *p;	flags=0;	if (DB_URL==0)	{		LOG(L_ERR,"ERROR:avpops:fixup_db_avp: you have to config a db url "			"for using avp_db_xxx functions\n");		return E_UNSPEC;	}	s = (char*)*param;	if (param_no==1)	{		/* prepare the fis_param structure */		sp = (struct fis_param*)pkg_malloc(sizeof(struct fis_param));		if (sp==0) {			LOG(L_ERR,"ERROR:avpops:fixup_db_avp: no more pkg mem\n");			return E_OUT_OF_MEM;		}		memset( sp, 0, sizeof(struct fis_param));		if (*s!='$')		{			/* is a constant string -> use it as uuid*/			sp->flags = AVPOPS_VAL_STR;			sp->val.s = (str*)pkg_malloc(strlen(s)+1+sizeof(str));			if (sp->val.s==0) {				LOG(L_ERR,"ERROR:avpops:fixup_db_avp: no more pkg mem\n");				return E_OUT_OF_MEM;			}			sp->val.s->s = ((char*)sp->val.s) + sizeof(str);			sp->val.s->len = strlen(s);			strcpy(sp->val.s->s,s);		} else {			/* is a variable $xxxxx */			s++;			if ( (p=strchr(s,'/'))!=0)				*(p++) = 0;			if ( (!strcasecmp( "from", s) && (flags|=AVPOPS_USE_FROM)) 			|| (!strcasecmp( "to", s) && (flags|=AVPOPS_USE_TO)) 			|| (!strcasecmp( "ruri", s) && (flags|=AVPOPS_USE_RURI)) )			{				/* check for extra flags/params */				if (p&&(!strcasecmp("domain",p)&&!(flags|=AVPOPS_FLAG_DOMAIN)))				{					LOG(L_ERR,"ERROR:avpops:fixup_db_avp: unknow flag "						"<%s>\n",p);					return E_UNSPEC;				}				memset( sp, 0, sizeof(struct fis_param));				sp->flags = flags|AVPOPS_VAL_NONE;			} else {				/* can be only an AVP alias */				alias .s = s+1;				alias.len = strlen(alias.s);				if ( p || lookup_avp_galias( &alias, &flags, &sp->val)==-1 )				{					LOG(L_ERR,"ERROR:avpops:fixup_db_avp: source/flags \"%s\""						" unknown!\n",s);					return E_UNSPEC;				}				sp->flags = AVPOPS_VAL_AVP |					((flags&AVP_NAME_STR)?AVPOPS_VAL_STR:AVPOPS_VAL_INT);			}		}		pkg_free(*param);		*param=(void*)sp;	} else if (param_no==2) {		/* compose the db_param structure */		dbp = (struct db_param*)pkg_malloc(sizeof(struct db_param));		if (dbp==0)		{			LOG(L_ERR,"ERROR:avpops:fixup_db_avp: no more pkg mem\n");			return E_OUT_OF_MEM;		}		memset( dbp, 0, sizeof(struct db_param));		if ( parse_avp_db( s, dbp, allow_scheme)!=0 )		{			LOG(L_ERR,"ERROR:avpops:fixup_db_avp: parse failed\n");			return E_UNSPEC;		}		pkg_free(*param);		*param=(void*)dbp;	}	return 0;}