aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-05 04:30:29 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:56:22 -0500
commit861934c7c888973da8bf621b3959e408531539e1 (patch)
treedd0f0c008e58c68bdb35129b00657ac873944461
parentea3a66ff5ae41daa1d1aa789140a70415eaf7b46 (diff)
[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 <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/netfilter/nfnetlink_queue.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 436b442d4edc..abd5ff9b89a7 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,
232 232
233 spin_lock_bh(&queue->lock); 233 spin_lock_bh(&queue->lock);
234 234
235 switch (queue->copy_mode) { 235 switch ((enum nfqnl_config_mode)queue->copy_mode) {
236 case NFQNL_COPY_META: 236 case NFQNL_COPY_META:
237 case NFQNL_COPY_NONE: 237 case NFQNL_COPY_NONE:
238 data_len = 0; 238 data_len = 0;
@@ -253,11 +253,6 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
253 253
254 size += nla_total_size(data_len); 254 size += nla_total_size(data_len);
255 break; 255 break;
256
257 default:
258 *errp = -EINVAL;
259 spin_unlock_bh(&queue->lock);
260 return NULL;
261 } 256 }
262 257
263 entry->id = queue->id_sequence++; 258 entry->id = queue->id_sequence++;