Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integer widths #594

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vm/ubpf_instruction_valid.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,15 +954,15 @@ static void _initialize_lookup_table()
return;
}

for (int i = 0; i < sizeof(_ubpf_instruction_filter) / sizeof(_ubpf_instruction_filter[0]); i++) {
for (size_t i = 0; i < sizeof(_ubpf_instruction_filter) / sizeof(_ubpf_instruction_filter[0]); i++) {
_ubpf_filter_instruction_lookup_table[_ubpf_instruction_filter[i].opcode] = &_ubpf_instruction_filter[i];
}

_initialized = true;
}


static bool _in_range(int value, int lower_bound, int upper_bound)
static bool _in_range(int32_t value, int32_t lower_bound, int32_t upper_bound)
{
return value >= lower_bound && value <= upper_bound;
}
Expand Down
Loading