diff options
author | Patrick McHardy <kaber@trash.net> | 2007-12-05 04:23:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:07 -0500 |
commit | 8b1cf0db2aced837fcd50072e81e32c5836a1ee1 (patch) | |
tree | 2e4b6d9f6a2bec04dd535d26fa3975a8eef3d989 | |
parent | 1999414a4ece2b8cea3fb3c4dc8fe06796256269 (diff) |
[NETFILTER]: nf_queue: minor cleanup
Clean up
if (x) y;
constructs. We've got nothing to hide :)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/netfilter/nf_queue.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 0cef1433d660..81d010a05b98 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
@@ -138,15 +138,18 @@ static int __nf_queue(struct sk_buff *skb, | |||
138 | } | 138 | } |
139 | 139 | ||
140 | /* Bump dev refs so they don't vanish while packet is out */ | 140 | /* Bump dev refs so they don't vanish while packet is out */ |
141 | if (indev) dev_hold(indev); | 141 | if (indev) |
142 | if (outdev) dev_hold(outdev); | 142 | dev_hold(indev); |
143 | 143 | if (outdev) | |
144 | dev_hold(outdev); | ||
144 | #ifdef CONFIG_BRIDGE_NETFILTER | 145 | #ifdef CONFIG_BRIDGE_NETFILTER |
145 | if (skb->nf_bridge) { | 146 | if (skb->nf_bridge) { |
146 | physindev = skb->nf_bridge->physindev; | 147 | physindev = skb->nf_bridge->physindev; |
147 | if (physindev) dev_hold(physindev); | 148 | if (physindev) |
149 | dev_hold(physindev); | ||
148 | physoutdev = skb->nf_bridge->physoutdev; | 150 | physoutdev = skb->nf_bridge->physoutdev; |
149 | if (physoutdev) dev_hold(physoutdev); | 151 | if (physoutdev) |
152 | dev_hold(physoutdev); | ||
150 | } | 153 | } |
151 | #endif | 154 | #endif |
152 | afinfo->saveroute(skb, info); | 155 | afinfo->saveroute(skb, info); |
@@ -156,11 +159,15 @@ static int __nf_queue(struct sk_buff *skb, | |||
156 | 159 | ||
157 | if (status < 0) { | 160 | if (status < 0) { |
158 | /* James M doesn't say fuck enough. */ | 161 | /* James M doesn't say fuck enough. */ |
159 | if (indev) dev_put(indev); | 162 | if (indev) |
160 | if (outdev) dev_put(outdev); | 163 | dev_put(indev); |
164 | if (outdev) | ||
165 | dev_put(outdev); | ||
161 | #ifdef CONFIG_BRIDGE_NETFILTER | 166 | #ifdef CONFIG_BRIDGE_NETFILTER |
162 | if (physindev) dev_put(physindev); | 167 | if (physindev) |
163 | if (physoutdev) dev_put(physoutdev); | 168 | dev_put(physindev); |
169 | if (physoutdev) | ||
170 | dev_put(physoutdev); | ||
164 | #endif | 171 | #endif |
165 | module_put(info->elem->owner); | 172 | module_put(info->elem->owner); |
166 | kfree(info); | 173 | kfree(info); |
@@ -222,8 +229,10 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info, | |||
222 | rcu_read_lock(); | 229 | rcu_read_lock(); |
223 | 230 | ||
224 | /* Release those devices we held, or Alexey will kill me. */ | 231 | /* Release those devices we held, or Alexey will kill me. */ |
225 | if (info->indev) dev_put(info->indev); | 232 | if (info->indev) |
226 | if (info->outdev) dev_put(info->outdev); | 233 | dev_put(info->indev); |
234 | if (info->outdev) | ||
235 | dev_put(info->outdev); | ||
227 | #ifdef CONFIG_BRIDGE_NETFILTER | 236 | #ifdef CONFIG_BRIDGE_NETFILTER |
228 | if (skb->nf_bridge) { | 237 | if (skb->nf_bridge) { |
229 | if (skb->nf_bridge->physindev) | 238 | if (skb->nf_bridge->physindev) |