diff --git a/btf/types.go b/btf/types.go index 8fe329aa4..421cc387d 100644 --- a/btf/types.go +++ b/btf/types.go @@ -117,7 +117,7 @@ type Int struct { } func (i *Int) Format(fs fmt.State, verb rune) { - formatType(fs, verb, i, i.Encoding, "size=", i.Size*8) + formatType(fs, verb, i, i.Encoding, "size=", i.Size) } func (i *Int) TypeName() string { return i.Name } diff --git a/btf/types_test.go b/btf/types_test.go index 78eb910fc..a8bd90456 100644 --- a/btf/types_test.go +++ b/btf/types_test.go @@ -502,5 +502,5 @@ func ExampleCopy_stripQualifiers() { b := Copy(a, UnderlyingType) // b has Volatile and Typedef removed. fmt.Printf("%3v\n", b) - // Output: Pointer[target=Int[unsigned size=16]] + // Output: Pointer[target=Int[unsigned size=2]] }