From 9e0846e8a4beebff36c72f03479a7db775b5144e Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 7 May 2018 17:59:06 +0200 Subject: all: get rid of underscores in identifiers Underscores are against Go coding style. Update #538 --- prog/rand.go | 12 ++++++------ prog/types.go | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'prog') diff --git a/prog/rand.go b/prog/rand.go index ad0ef1c7c..5489ca10d 100644 --- a/prog/rand.go +++ b/prog/rand.go @@ -322,7 +322,7 @@ func (r *randGen) createResource(s *state, res *ResourceType) (arg Arg, calls [] func (r *randGen) generateText(kind TextKind) []byte { switch kind { - case Text_arm64: + case TextArm64: // Just a stub, need something better. text := make([]byte, 50) for i := range text { @@ -337,7 +337,7 @@ func (r *randGen) generateText(kind TextKind) []byte { func (r *randGen) mutateText(kind TextKind, text []byte) []byte { switch kind { - case Text_arm64: + case TextArm64: return mutateData(r, text, 40, 60) default: cfg := createIfuzzConfig(kind) @@ -365,13 +365,13 @@ func createIfuzzConfig(kind TextKind) *ifuzz.Config { }, } switch kind { - case Text_x86_real: + case TextX86Real: cfg.Mode = ifuzz.ModeReal16 - case Text_x86_16: + case TextX86bit16: cfg.Mode = ifuzz.ModeProt16 - case Text_x86_32: + case TextX86bit32: cfg.Mode = ifuzz.ModeProt32 - case Text_x86_64: + case TextX86bit64: cfg.Mode = ifuzz.ModeLong64 } return cfg diff --git a/prog/types.go b/prog/types.go index 74dc17d02..9b80d0576 100644 --- a/prog/types.go +++ b/prog/types.go @@ -252,11 +252,11 @@ const ( type TextKind int const ( - Text_x86_real TextKind = iota - Text_x86_16 - Text_x86_32 - Text_x86_64 - Text_arm64 + TextX86Real TextKind = iota + TextX86bit16 + TextX86bit32 + TextX86bit64 + TextArm64 ) type BufferType struct { -- cgit mrf-deployment