From 1da82ae0f070bbed7300a8e9462abeeb0cf3c344 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 1 Aug 2018 19:45:15 +0200 Subject: prog: introduce debugValidate Move debug validation into a separate function. Update #538 --- prog/mutation.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'prog/mutation.go') diff --git a/prog/mutation.go b/prog/mutation.go index fd5ef8f89..9dd06a4ba 100644 --- a/prog/mutation.go +++ b/prog/mutation.go @@ -134,11 +134,7 @@ outer: for _, c := range p.Calls { p.Target.SanitizeCall(c) } - if debug { - if err := p.validate(); err != nil { - panic(err) - } - } + p.debugValidate() } func (target *Target) mutateArg(r *randGen, s *state, arg Arg, ctx ArgCtx, updateSizes *bool) ([]*Call, bool) { -- cgit mrf-deployment