xt_ACCOUNT: indent reduction

Invert early terminating conditions so the rest of the block can be
de-indented.
This commit is contained in:
Jan Engelhardt
2015-11-09 22:31:23 +01:00
parent fcb19403bc
commit 60b6b1dbef

View File

@@ -631,7 +631,8 @@ static int ipt_acc_handle_prepare_read(char *tablename,
unsigned int b;
for (b = 0; b <= 255; b++) {
if (src_16->mask_24[b]) {
if (src_16->mask_24[b] == NULL)
continue;
if ((network_16->mask_24[b] =
ipt_acc_zalloc_page()) == NULL) {
printk("ACCOUNT: out of memory during copy of 16 bit "
@@ -643,7 +644,6 @@ static int ipt_acc_handle_prepare_read(char *tablename,
memcpy(network_16->mask_24[b], src_16->mask_24[b],
sizeof(struct ipt_acc_mask_24));
}
}
} else if (depth == 2) {
struct ipt_acc_mask_8 *src_8 =
ipt_acc_tables[table_nr].data;
@@ -652,7 +652,8 @@ static int ipt_acc_handle_prepare_read(char *tablename,
unsigned int a, b;
for (a = 0; a <= 255; a++) {
if (src_8->mask_16[a]) {
if (src_8->mask_16[a] == NULL)
continue;
if ((network_8->mask_16[a] =
ipt_acc_zalloc_page()) == NULL) {
printk("ACCOUNT: out of memory during copy of 24 bit network"
@@ -668,7 +669,8 @@ static int ipt_acc_handle_prepare_read(char *tablename,
network_16 = network_8->mask_16[a];
for (b = 0; b <= 255; b++) {
if (src_16->mask_24[b]) {
if (src_16->mask_24[b] == NULL)
continue;
if ((network_16->mask_24[b] =
ipt_acc_zalloc_page()) == NULL) {
printk("ACCOUNT: out of memory during copy of 16 bit"
@@ -682,8 +684,6 @@ static int ipt_acc_handle_prepare_read(char *tablename,
}
}
}
}
}
*count = ipt_acc_tables[table_nr].itemcount;
@@ -742,9 +742,11 @@ static int ipt_acc_handle_copy_data(void *to_user, unsigned long *to_user_pos,
unsigned int i;
for (i = 0; i <= 255; i++) {
if (data->ip[i].src_packets || data->ip[i].dst_packets) {
handle_ip.ip = net_ip | net_OR_mask | i;
if (data->ip[i].src_packets == 0 &&
data->ip[i].dst_packets == 0)
continue;
handle_ip.ip = net_ip | net_OR_mask | i;
handle_ip.src_packets = data->ip[i].src_packets;
handle_ip.src_bytes = data->ip[i].src_bytes;
handle_ip.dst_packets = data->ip[i].dst_packets;
@@ -761,7 +763,6 @@ static int ipt_acc_handle_copy_data(void *to_user, unsigned long *to_user_pos,
memcpy(ipt_acc_tmpbuf + *tmpbuf_pos, &handle_ip, handle_ip_size);
*tmpbuf_pos += handle_ip_size;
}
}
return 0;
}