Skip to content

fix(switch_count): check print_log2_hists() result instead of stale err - #142

Open
JoeSergen wants to merge 1 commit into
DKapture:mainfrom
JoeSergen:fix/switch-count-error-check
Open

fix(switch_count): check print_log2_hists() result instead of stale err#142
JoeSergen wants to merge 1 commit into
DKapture:mainfrom
JoeSergen:fix/switch-count-error-check

Conversation

@JoeSergen

Copy link
Copy Markdown

Fixes #133

The main loop discarded the return value of print_log2_hists() and then checked the leftover err from switch_count_bpf__attach() (0 on success), making the error branch dead code. Capture the return value into err.

The main loop discarded the return value of print_log2_hists() and then
checked the leftover err from switch_count_bpf__attach(), which is 0 on
success, so the error branch was dead code and histogram read/cleanup
failures went unreported. Capture the return value into err.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: switch_count ?? print_log2_hists() ???,??????????

1 participant