likely/unlikely branch prediction
[lttv.git] / ltt / branches / poly / lttv / lttv / hook.h
index 77a5dd5f59194ede727e5760c55d9f62f741ab88..7da21346f2c2cd3f82b55e3e658bed53b0ed49f6 100644 (file)
@@ -147,7 +147,7 @@ unsigned lttv_hooks_by_id_max_id(LttvHooksById *h);
 static inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id)
 {
   LttvHooks *ret;
-  if(id < h->len) ret = h->pdata[id];
+  if(likely(id < h->len)) ret = h->pdata[id];
   else ret = NULL;
 
   return ret;
This page took 0.024192 seconds and 4 git commands to generate.