Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=861934c7c888973da8bf621b3959e408531539e1
Commit:     861934c7c888973da8bf621b3959e408531539e1
Parent:     ea3a66ff5ae41daa1d1aa789140a70415eaf7b46
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 5 01:30:29 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:56:22 2008 -0800

    [NETFILTER]: nfnetlink_queue: eliminate impossible switch case
    
    We don't need a default case in nfqnl_build_packet_message(), the
    copy_mode is validated when it is set. Tell the compiler about
    the possible types and remove the default case. Saves 80b of
    text on x86_64.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/nfnetlink_queue.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 436b442..abd5ff9 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -232,7 +232,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
 
        spin_lock_bh(&queue->lock);
 
-       switch (queue->copy_mode) {
+       switch ((enum nfqnl_config_mode)queue->copy_mode) {
        case NFQNL_COPY_META:
        case NFQNL_COPY_NONE:
                data_len = 0;
@@ -253,11 +253,6 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
 
                size += nla_total_size(data_len);
                break;
-
-       default:
-               *errp = -EINVAL;
-               spin_unlock_bh(&queue->lock);
-               return NULL;
        }
 
        entry->id = queue->id_sequence++;
-
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