Skip to content

Commit

Permalink
do not merge: Temporary fix for is_power_of_2.
Browse files Browse the repository at this point in the history
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
  • Loading branch information
eiffel-fl committed Aug 30, 2022
1 parent da7b90a commit 1c0a50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/bpf/libbpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -4945,7 +4945,7 @@ static void bpf_map__destroy(struct bpf_map *map);

static bool is_pow_of_2(size_t x)
{
return x && (x & (x - 1));
return x && (x & (x - 1)) == 0;
}

static size_t adjust_ringbuf_sz(size_t sz)
Expand Down

0 comments on commit 1c0a50f

Please sign in to comment.