Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeauclair committed Jun 24, 2024
1 parent 28e0be5 commit 176474a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions assert/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ func CallerInfo() []string {
pcs := make([]uintptr, stackFrameBufferSize)
offset := 1
n := runtime.Callers(offset, pcs)
maybeMore := true
if n < stackFrameBufferSize {
maybeMore = false
}
maybeMore := n == stackFrameBufferSize

if n == 0 {
return []string{}
Expand Down Expand Up @@ -283,13 +280,12 @@ func CallerInfo() []string {
}
offset += stackFrameBufferSize
n = runtime.Callers(offset, pcs)
if n < stackFrameBufferSize {
maybeMore = false
}

if n == 0 {
break
}

maybeMore = n == stackFrameBufferSize

frames = runtime.CallersFrames(pcs[:n])
}

Expand Down

0 comments on commit 176474a

Please sign in to comment.