Skip to content

section_idx_from_name dead code? #768

Open

Description

@jzenoz

Ref:

ubpf/vm/ubpf_loader.c

Lines 97 to 106 in 2749995

int
section_idx_from_name(const char** section_names, int length, const char* needle)
{
for (int i = 0; i < length; i++) {
if (!strcmp(section_names[i], needle)) {
return i;
}
}
return -1;
}

I don't see section_idx_from_name used anywhere and when it was introduced it also wasn't used anywhere, ref:
f322f8c
#310

section_idx_from_name can cause issues when ubpf is compiled with -Wmissing-prototypes if it is dead code it should be removed ideally.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions