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

parse_bracket: fix bugs with stralloc

parent 204bef7f
No related branches found
No related tags found
No related merge requests found
......@@ -237,7 +237,6 @@ int parse_service_before(char const *src,char const *sv,char const *tree,strallo
if (!r) return 0 ;
if (r == 2) VERBO3 strerr_warni3x("ignore ",deps.s+(genalloc_s(unsigned int,&gadeps)[sv_before.cname.idga+i])," service dependency: already added") ;
}
}
stralloc_free(&srctmp) ;
......
......@@ -126,8 +126,9 @@ int get_key(char const *s,char const *key,stralloc *keep)
{
int pos,newpos ;
size_t end ;
pos = get_keyline(s,key,keep) ;
if (pos < 0){
return -1 ;
}
......@@ -299,9 +300,9 @@ int parse_bracket(keynocheck *nocheck)
ssize_t start,end,nl ;
size_t nlen ;
char tmp[nocheck->val.len + 1 + 1] ;
char tmp[nocheck->val.len + 1] ;
start = end = nl = 0 ;
nlen = nocheck->val.len ;
nlen = nocheck->val.len - 1 ;
start = get_len_until(nocheck->val.s,'(') ;
if (start < 0) return 0 ;
start++;
......
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