From: compudj Date: Sat, 14 Aug 2004 21:06:03 +0000 (+0000) Subject: correct inlining of hook by id get X-Git-Tag: v0.12.20~2731 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=88237536a72d70abfc670286eae1cf7c44c1a50b;p=lttv.git correct inlining of hook by id get git-svn-id: http://ltt.polymtl.ca/svn@758 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/lttv/hook.c b/ltt/branches/poly/lttv/lttv/hook.c index 45870c32..9f08b98b 100644 --- a/ltt/branches/poly/lttv/lttv/hook.c +++ b/ltt/branches/poly/lttv/lttv/hook.c @@ -416,17 +416,6 @@ unsigned lttv_hooks_by_id_max_id(LttvHooksById *h) return h->len; } - -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; -} - - void lttv_hooks_by_id_remove(LttvHooksById *h, unsigned id) { if(id < h->len && h->pdata[id] != NULL) { diff --git a/ltt/branches/poly/lttv/lttv/hook.h b/ltt/branches/poly/lttv/lttv/hook.h index 193714c6..502ac5c8 100644 --- a/ltt/branches/poly/lttv/lttv/hook.h +++ b/ltt/branches/poly/lttv/lttv/hook.h @@ -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 */