Annotate prio heap likely branch
[babeltrace.git] / include / babeltrace / prio_heap.h
index 1a523313f84134d07f75f3c547a294dd6128c0a7..b3e2491e519b9be5e86409b54f89a3985397cafb 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <unistd.h>
+#include <babeltrace/babeltrace-internal.h>
 
 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;
 }
 
 /**
This page took 0.022879 seconds and 4 git commands to generate.