]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Inline functions iptcc_is_builtin() and set_changed().
authorJesper Dangaard Brouer <hawk@comx.dk>
Tue, 15 Jan 2008 17:01:58 +0000 (17:01 +0000)
committerPatrick McHardy <kaber@trash.net>
Tue, 15 Jan 2008 17:01:58 +0000 (17:01 +0000)
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>
libiptc/libiptc.c

index 29f671e6ef3746887fec8625d74bff7c52585afc..5afaf4079489db6c0fa492e7a55b7b9ac3024052 100644 (file)
@@ -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);
 }