From: fennecdjay Date: Tue, 10 Nov 2020 23:16:31 +0000 (+0100) Subject: :art: Remove goto X-Git-Tag: nightly~1181 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c77ffa012f3a7d67d5e8f26644f0206b78b9008a;p=gwion.git :art: Remove goto --- diff --git a/src/parse/func_resolve_tmpl.c b/src/parse/func_resolve_tmpl.c index 994f4966..4f623be7 100644 --- a/src/parse/func_resolve_tmpl.c +++ b/src/parse/func_resolve_tmpl.c @@ -159,13 +159,12 @@ ANN Func find_template_match(const Env env, const Value value, const Exp_Call* e while(t && t->nspc) { Func_Def fdef = value->d.func_ref ? value->d.func_ref->def : value->type->info->func->def; const Value v = nspc_lookup_value0(t->nspc, fdef->base->xid); - if(!v) - goto next; - const Func f = _find_template_match(env, v, exp); - if(f) - return f; - next: - t = t->info->parent; + if(!v) { + const Func f = _find_template_match(env, v, exp); + if(f) + return f; + } + t = t->info->parent; } ERR_O(exp_self(exp)->pos, _("arguments do not match for template call")) }