Skip to content
Snippets Groups Projects
Commit 5afedb64 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

remove useless allocation

parent 807780ab
No related branches found
No related tags found
No related merge requests found
......@@ -53,11 +53,15 @@ int instance_splitname(stralloc *sa,char const *name,int len,int what)
sa->len = 0 ;
if (!what)
{
if (!stralloc_cats(sa,template) ||
!stralloc_0(sa)) return 0 ;
}
else
{
if (!stralloc_catb(sa,copy,strlen(copy)) ||
!stralloc_0(sa)) return 0 ;
}
return 1 ;
}
......@@ -68,10 +72,6 @@ int instance_create(stralloc *sasv,char const *svname, char const *regex, int le
stralloc tmp = STRALLOC_ZERO ;
char template[tlen + 1] ;
memcpy(template,svname,tlen) ;
template[tlen] = 0 ;
if (!auto_stra(&tmp,sasv->s)) goto err ;
copy = svname + tlen ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment