correct inlining of hook by id get
[lttv.git] / ltt / branches / poly / lttv / lttv / hook.h
index 193714c6d987407a726c707005f6d0a3c6b7a041..502ac5c8732b4b337fd9f4b6db3e2492fd1e62b7 100644 (file)
@@ -144,7 +144,14 @@ unsigned lttv_hooks_by_id_max_id(LttvHooksById *h);
 
 /* Get the list of hooks for an id, NULL if none exists */
 
-LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id);
+inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id)
+{
+  LttvHooks *ret;
+  if(id < h->len) ret = h->pdata[id];
+  else ret = NULL;
+
+  return ret;
+}
 
 
 /* Remove the list of hooks associated with an id */
This page took 0.023436 seconds and 4 git commands to generate.