From bc734e7ada413654f1b7d948b2a857260a52dd9c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 1 May 2020 13:05:28 +0200 Subject: prog: rename {PtrType,ArrayType}.Type to Elem Name "Type" is confusing when referring to pointer/array element type. Frequently there are too many Type/typ/typ1/t and typ.Type is not very informative. It _is_ a type, but what's usually more relevant is that it's an _element_ type. Let's leave type checking to compiler and give it a more meaningful name. --- sys/linux/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/linux') diff --git a/sys/linux/init.go b/sys/linux/init.go index 9a6eaf62e..0ad4bfeee 100644 --- a/sys/linux/init.go +++ b/sys/linux/init.go @@ -321,7 +321,7 @@ func (arch *arch) generateTimespec(g *prog.Gen, typ0 prog.Type, dir prog.Dir, ol // Few ms ahead for absolute. meta := arch.clockGettimeSyscall ptrArgType := meta.Args[1].(*prog.PtrType) - argType := ptrArgType.Type.(*prog.StructType) + argType := ptrArgType.Elem.(*prog.StructType) tp := prog.MakeGroupArg(argType, prog.DirOut, []prog.Arg{ prog.MakeResultArg(argType.Fields[0], prog.DirOut, nil, 0), prog.MakeResultArg(argType.Fields[1], prog.DirOut, nil, 0), -- cgit mrf-deployment