diff options
author | Jesper Dangaard Brouer <hawk@comx.dk> | 2008-01-15 17:01:58 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-01-15 17:01:58 +0000 |
commit | 910939897ea0cb9be2729a98c60a92e807aad5c3 (patch) | |
tree | b573d41e86ccd23a0f40c6a8b9a9ac9ac4cabf22 /libiptc | |
parent | 2c3ce6ad598cb479640f6f14c7c5e25488923062 (diff) |
Inline functions iptcc_is_builtin() and set_changed().
The two functions are obvious candidates for inlining.
Using gprof(1) shows that they actually affects performance.
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Diffstat (limited to 'libiptc')
-rw-r--r-- | libiptc/libiptc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 29f671e6..5afaf407 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -166,7 +166,7 @@ static struct rule_head *iptcc_alloc_rule(struct chain_head *c, unsigned int siz } /* notify us that the ruleset has been modified by the user */ -static void +static inline void set_changed(TC_HANDLE_T h) { h->changed = 1; @@ -268,7 +268,7 @@ iptcb_ent_is_hook_entry(STRUCT_ENTRY *e, TC_HANDLE_T h) **********************************************************************/ /* Is the given chain builtin (1) or user-defined (0) */ -static unsigned int iptcc_is_builtin(struct chain_head *c) +static inline unsigned int iptcc_is_builtin(struct chain_head *c) { return (c->hooknum ? 1 : 0); } |