Skip to content

Commit 2d7c189

Browse files
authored
dyninst/irgen: misc cleanup (#42985)
### What does this PR do? Total drive-by cleanup to match a style I prefer. ### Motivation Feelings. ### Describe how you validated your changes No changes to behavior Co-authored-by: andrew.werner <andrew.werner@datadoghq.com>
1 parent 02d4183 commit 2d7c189

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

pkg/dyninst/irgen/irgen.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,9 +2490,7 @@ func newProbe(
24902490
}
24912491
}
24922492
for _, inlined := range subprogram.InlinePCRanges {
2493-
var issue ir.Issue
2494-
var err error
2495-
injectionPoints, _, issue, err = pickInjectionPoint(
2493+
ips, _, issue, err := pickInjectionPoint(
24962494
inlined.Ranges,
24972495
inlined.RootRanges,
24982496
true, /* inlined */
@@ -2503,9 +2501,10 @@ func newProbe(
25032501
injectionPoints,
25042502
skipReturnEvents,
25052503
)
2506-
if issue != (ir.Issue{}) || err != nil {
2504+
if !issue.IsNone() || err != nil {
25072505
return nil, issue, err
25082506
}
2507+
injectionPoints = ips
25092508
}
25102509
slices.SortFunc(injectionPoints, func(a, b ir.InjectionPoint) int {
25112510
return cmp.Compare(a.PC, b.PC)

0 commit comments

Comments
 (0)