Skip to content

Commit

Permalink
Fix integer widths (#594)
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan-Jowett and Alan Jowett authored Oct 30, 2024
1 parent 3c639e6 commit 2d75c56
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 2d75c56

Please sign in to comment.