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

fix use of the same stralloc

parent bea3d39a
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,8 @@ int parse_service_before(ssexec_t *info,stralloc *parsed_list, char const *sv,un
else if (!r) return 0 ;
sv_alltype sv_before = SV_ALLTYPE_ZERO ;
sasv->len = 0 ;
insta = instance_check(svname) ;
if (!insta)
{
......
......@@ -146,7 +146,9 @@ int section_get_range(section_t *sasection,stralloc *src)
wild_zero_all(&MILL_GET_SECTION_NAME) ;
r = mill_string(&cp,src,&MILL_GET_LINE) ;
if (r == -1 || !r) goto err ;
if (!sastr_rebuild_in_nline(&cp)) goto err ;
if (!sastr_rebuild_in_nline(&cp) ||
!stralloc_0(&cp)) goto err ;
while (pos < cp.len)
{
if(secname.len && n)
......@@ -829,7 +831,6 @@ int read_svfile(stralloc *sasv,char const *name,char const *src)
VERBO3 strerr_warnw2x(svtmp," is empty") ;
return 0 ;
}
sasv->len = 0 ;
r = openreadfileclose(svtmp,sasv,filesize) ;
if(!r)
......
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