aboutsummaryrefslogtreecommitdiffstats
path: root/prog/mutation.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-08-01 19:45:15 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-08-02 16:57:31 +0200
commit1da82ae0f070bbed7300a8e9462abeeb0cf3c344 (patch)
treee42ef3d6c468255729aadb06e27fb0c024054525 /prog/mutation.go
parentc8643744fe4be55e516f7ba494777016abc1055e (diff)
prog: introduce debugValidate
Move debug validation into a separate function. Update #538
Diffstat (limited to 'prog/mutation.go')
-rw-r--r--prog/mutation.go6
1 files changed, 1 insertions, 5 deletions
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) {