Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=09972d6f968d67dd82cbd403d5aa42c241a8d0cb
Commit:     09972d6f968d67dd82cbd403d5aa42c241a8d0cb
Parent:     1b53d9042c04b8eb875d02e65792e9884efc3784
Author:     Michal Miroslaw <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 23 11:10:47 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:36 2007 -0700

    [NETFILTER]: nfnetlink_log: don't count max(a,b) twice
    
    We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes
    the maximum anyway.
    
    Signed-off-by: Michal Miroslaw <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/nfnetlink_log.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 8ae83cb..3b849a7 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to