aboutsummaryrefslogtreecommitdiffstats
path: root/prog/rand.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2021-08-31 17:21:33 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2021-09-22 15:40:02 +0200
commit9e4e4272d3f686e750a13d2111b0fb7041db2f4a (patch)
tree288c3421a8da52fcb7e460247f9678fece2ed1c9 /prog/rand.go
parent169724fe58e8d7d0b4be6f59ca7c1e0f300399e1 (diff)
all: introduce a prog.Call constructor
Create a constructor for the prog.Call type. It allows to reduce the duplication of code now and during further changes.
Diffstat (limited to 'prog/rand.go')
-rw-r--r--prog/rand.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/prog/rand.go b/prog/rand.go
index 7ab5068cb..f36cb0822 100644
--- a/prog/rand.go
+++ b/prog/rand.go
@@ -551,10 +551,7 @@ func (r *randGen) generateParticularCall(s *state, meta *Syscall) (calls []*Call
if meta.Attrs.Disabled {
panic(fmt.Sprintf("generating disabled call %v", meta.Name))
}
- c := &Call{
- Meta: meta,
- Ret: MakeReturnArg(meta.Ret),
- }
+ c := MakeCall(meta, nil)
c.Args, calls = r.generateArgs(s, meta.Args, DirIn)
r.target.assignSizesCall(c)
return append(calls, c)