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. --- pkg/host/syscalls_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/host/syscalls_linux.go') diff --git a/pkg/host/syscalls_linux.go b/pkg/host/syscalls_linux.go index dd89733c0..184bf6410 100644 --- a/pkg/host/syscalls_linux.go +++ b/pkg/host/syscalls_linux.go @@ -403,7 +403,7 @@ func extractStringConst(typ prog.Type) (string, bool) { if !ok { panic("first open arg is not a pointer to string const") } - str, ok := ptr.Type.(*prog.BufferType) + str, ok := ptr.Elem.(*prog.BufferType) if !ok || str.Kind != prog.BufferString || len(str.Values) == 0 { return "", false } -- cgit mrf-deployment