netfilter: xtables: reduce indent level by one

Cosmetic only. Transformation applied:

	-if (foo) { long block; } else { short block; }
	+if (!foo) { short block; continue; } long block;

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
This commit is contained in:
Jan Engelhardt 2009-04-15 21:28:39 +02:00
Родитель 98e8640316
Коммит a1ff4ac84e
3 изменённых файлов: 189 добавлений и 201 удалений

Просмотреть файл

@ -273,13 +273,16 @@ unsigned int arpt_do_table(struct sk_buff *skb,
arp = arp_hdr(skb);
do {
if (arp_packet_match(arp, skb->dev, indev, outdev, &e->arp)) {
struct arpt_entry_target *t;
int hdr_len;
if (!arp_packet_match(arp, skb->dev, indev, outdev, &e->arp)) {
e = arpt_next_entry(e);
continue;
}
hdr_len = sizeof(*arp) + (2 * sizeof(struct in_addr)) +
(2 * skb->dev->addr_len);
ADD_COUNTER(e->counters, hdr_len, 1);
t = arpt_get_target(e);
@ -296,17 +299,14 @@ unsigned int arpt_do_table(struct sk_buff *skb,
break;
}
e = back;
back = get_entry(table_base,
back->comefrom);
back = get_entry(table_base, back->comefrom);
continue;
}
if (table_base + v
!= arpt_next_entry(e)) {
/* Save old back ptr in next entry */
struct arpt_entry *next
= arpt_next_entry(e);
next->comefrom =
(void *)back - table_base;
struct arpt_entry *next = arpt_next_entry(e);
next->comefrom = (void *)back - table_base;
/* set back pointer to next entry */
back = next;
@ -319,8 +319,7 @@ unsigned int arpt_do_table(struct sk_buff *skb,
*/
tgpar.target = t->u.kernel.target;
tgpar.targinfo = t->data;
verdict = t->u.kernel.target->target(skb,
&tgpar);
verdict = t->u.kernel.target->target(skb, &tgpar);
/* Target might have changed stuff. */
arp = arp_hdr(skb);
@ -331,9 +330,6 @@ unsigned int arpt_do_table(struct sk_buff *skb,
/* Verdict */
break;
}
} else {
e = arpt_next_entry(e);
}
} while (!hotdrop);
xt_info_rdunlock_bh();

Просмотреть файл

@ -354,11 +354,16 @@ ipt_do_table(struct sk_buff *skb,
back = get_entry(table_base, private->underflow[hook]);
do {
struct ipt_entry_target *t;
IP_NF_ASSERT(e);
IP_NF_ASSERT(back);
if (ip_packet_match(ip, indev, outdev,
if (!ip_packet_match(ip, indev, outdev,
&e->ip, mtpar.fragoff)) {
struct ipt_entry_target *t;
no_match:
e = ipt_next_entry(e);
continue;
}
if (IPT_MATCH_ITERATE(e, do_match, skb, &mtpar) != 0)
goto no_match;
@ -387,17 +392,14 @@ ipt_do_table(struct sk_buff *skb,
break;
}
e = back;
back = get_entry(table_base,
back->comefrom);
back = get_entry(table_base, back->comefrom);
continue;
}
if (table_base + v != ipt_next_entry(e)
&& !(e->ip.flags & IPT_F_GOTO)) {
/* Save old back ptr in next entry */
struct ipt_entry *next
= ipt_next_entry(e);
next->comefrom
= (void *)back - table_base;
struct ipt_entry *next = ipt_next_entry(e);
next->comefrom = (void *)back - table_base;
/* set back pointer to next entry */
back = next;
}
@ -412,8 +414,7 @@ ipt_do_table(struct sk_buff *skb,
((struct ipt_entry *)table_base)->comefrom
= 0xeeeeeeec;
#endif
verdict = t->u.kernel.target->target(skb,
&tgpar);
verdict = t->u.kernel.target->target(skb, &tgpar);
#ifdef CONFIG_NETFILTER_DEBUG
if (((struct ipt_entry *)table_base)->comefrom
!= 0xeeeeeeec
@ -435,11 +436,6 @@ ipt_do_table(struct sk_buff *skb,
/* Verdict */
break;
}
} else {
no_match:
e = ipt_next_entry(e);
}
} while (!hotdrop);
xt_info_rdunlock_bh();

Просмотреть файл

@ -381,11 +381,16 @@ ip6t_do_table(struct sk_buff *skb,
back = get_entry(table_base, private->underflow[hook]);
do {
struct ip6t_entry_target *t;
IP_NF_ASSERT(e);
IP_NF_ASSERT(back);
if (ip6_packet_match(skb, indev, outdev, &e->ipv6,
if (!ip6_packet_match(skb, indev, outdev, &e->ipv6,
&mtpar.thoff, &mtpar.fragoff, &hotdrop)) {
struct ip6t_entry_target *t;
no_match:
e = ip6t_next_entry(e);
continue;
}
if (IP6T_MATCH_ITERATE(e, do_match, skb, &mtpar) != 0)
goto no_match;
@ -416,17 +421,14 @@ ip6t_do_table(struct sk_buff *skb,
break;
}
e = back;
back = get_entry(table_base,
back->comefrom);
back = get_entry(table_base, back->comefrom);
continue;
}
if (table_base + v != ip6t_next_entry(e)
&& !(e->ipv6.flags & IP6T_F_GOTO)) {
/* Save old back ptr in next entry */
struct ip6t_entry *next
= ip6t_next_entry(e);
next->comefrom
= (void *)back - table_base;
struct ip6t_entry *next = ip6t_next_entry(e);
next->comefrom = (void *)back - table_base;
/* set back pointer to next entry */
back = next;
}
@ -442,8 +444,7 @@ ip6t_do_table(struct sk_buff *skb,
((struct ip6t_entry *)table_base)->comefrom
= 0xeeeeeeec;
#endif
verdict = t->u.kernel.target->target(skb,
&tgpar);
verdict = t->u.kernel.target->target(skb, &tgpar);
#ifdef CONFIG_NETFILTER_DEBUG
if (((struct ip6t_entry *)table_base)->comefrom
@ -462,11 +463,6 @@ ip6t_do_table(struct sk_buff *skb,
/* Verdict */
break;
}
} else {
no_match:
e = ip6t_next_entry(e);
}
} while (!hotdrop);
#ifdef CONFIG_NETFILTER_DEBUG