diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2021-08-31 17:21:33 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-09-22 15:40:02 +0200 |
| commit | 9e4e4272d3f686e750a13d2111b0fb7041db2f4a (patch) | |
| tree | 288c3421a8da52fcb7e460247f9678fece2ed1c9 /prog/encoding.go | |
| parent | 169724fe58e8d7d0b4be6f59ca7c1e0f300399e1 (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/encoding.go')
| -rw-r--r-- | prog/encoding.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/prog/encoding.go b/prog/encoding.go index b389fc10d..de0e324b1 100644 --- a/prog/encoding.go +++ b/prog/encoding.go @@ -263,11 +263,8 @@ func (p *parser) parseProg() (*Prog, error) { if meta == nil { return nil, fmt.Errorf("unknown syscall %v", name) } - c := &Call{ - Meta: meta, - Ret: MakeReturnArg(meta.Ret), - Comment: p.comment, - } + c := MakeCall(meta, nil) + c.Comment = p.comment prog.Calls = append(prog.Calls, c) p.Parse('(') for i := 0; p.Char() != ')'; i++ { |
