[NETFILTER]: nfnetlink_log: don't count max(a,b) twice
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>
Fri, 23 Mar 2007 18:10:47 +0000 (11:10 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:27:36 +0000 (22:27 -0700)
We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes
the maximum anyway.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nfnetlink_log.c

index 8ae83cb9a39cb5f637a189adbe0556b541b14504..3b849a72d7c992094f9ea4b2be2a410e1cd5d709 100644 (file)
@@ -590,7 +590,6 @@ nfulnl_log_packet(unsigned int pf,
        struct nfulnl_instance *inst;
        const struct nf_loginfo *li;
        unsigned int qthreshold;
-       unsigned int nlbufsiz;
        unsigned int plen;
 
        if (li_user && li_user->type == NF_LOG_TYPE_ULOG)
@@ -666,13 +665,8 @@ nfulnl_log_packet(unsigned int pf,
                return;
        }
 
-       if (size > inst->nlbufsiz)
-               nlbufsiz = size;
-       else
-               nlbufsiz = inst->nlbufsiz;
-
        if (!inst->skb) {
-               if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {
+               if (!(inst->skb = nfulnl_alloc_skb(inst->nlbufsiz, size))) {
                        UDEBUG("error in nfulnl_alloc_skb(%u, %u)\n",
                                inst->nlbufsiz, size);
                        goto alloc_failure;
@@ -688,7 +682,7 @@ nfulnl_log_packet(unsigned int pf,
                        instance_put(inst);
                __nfulnl_send(inst);
 
-               if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {
+               if (!(inst->skb = nfulnl_alloc_skb(inst->nlbufsiz, size))) {
                        UDEBUG("error in nfulnl_alloc_skb(%u, %u)\n",
                                inst->nlbufsiz, size);
                        goto alloc_failure;