From 9e4e4272d3f686e750a13d2111b0fb7041db2f4a Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 31 Aug 2021 17:21:33 +0000 Subject: 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. --- prog/prog.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'prog/prog.go') diff --git a/prog/prog.go b/prog/prog.go index bcc86fb02..576348085 100644 --- a/prog/prog.go +++ b/prog/prog.go @@ -20,6 +20,14 @@ type Call struct { Comment string } +func MakeCall(meta *Syscall, args []Arg) *Call { + return &Call{ + Meta: meta, + Args: args, + Ret: MakeReturnArg(meta.Ret), + } +} + type Arg interface { Type() Type Dir() Dir -- cgit mrf-deployment