We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a54e101 commit f4e1611Copy full SHA for f4e1611
lib/os/heap.c
@@ -207,8 +207,8 @@ static chunkid_t alloc_chunk(struct z_heap *h, size_t sz)
207
*/
208
size_t bmask = h->avail_buckets & ~((1 << (bi + 1)) - 1);
209
210
- if ((bmask & h->avail_buckets) != 0U) {
211
- int minbucket = __builtin_ctz(bmask & h->avail_buckets);
+ if (bmask != 0U) {
+ int minbucket = __builtin_ctz(bmask);
212
chunkid_t c = h->buckets[minbucket].next;
213
214
free_list_remove_bidx(h, c, minbucket);
0 commit comments