X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fprio_heap.h;h=b3e2491e519b9be5e86409b54f89a3985397cafb;hb=de913cfdf87242ec3ff54c72a318ebb8714e5465;hp=1a523313f84134d07f75f3c547a294dd6128c0a7;hpb=eacd552cb253ddc9d05fac6b753fcab84124d9cf;p=babeltrace.git diff --git a/include/babeltrace/prio_heap.h b/include/babeltrace/prio_heap.h index 1a523313..b3e2491e 100644 --- a/include/babeltrace/prio_heap.h +++ b/include/babeltrace/prio_heap.h @@ -21,6 +21,7 @@ */ #include +#include struct ptr_heap { size_t len, alloc_len; @@ -47,7 +48,7 @@ void check_heap(const struct ptr_heap *heap) static inline void *heap_maximum(const struct ptr_heap *heap) { check_heap(heap); - return heap->len ? heap->ptrs[0] : NULL; + return likely(heap->len) ? heap->ptrs[0] : NULL; } /**