summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-04-28 15:26:17 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-04-28 15:26:17 +0200
commit6d42a29e8ff8403dd3cefd9f3ac7d480e4d1d9b6 (patch)
tree25ce84caf696345f9d86be9620c29ebe723ca6aa
parentd21b30bd64fdf4e7358037aa2d6f0cea02c49b6e (diff)
netsniff-ng: Remove locally declared labels
These usually only make sense for complex macros which are expanded moree than once. The label for `out' doesn't make sense anyhow as it is declared on function level. Also don't indent the labels, so they're clearer to spot. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--netsniff-ng.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 1e9d6f9..8cbe484 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -168,7 +168,6 @@ static inline bool dump_to_pcap(struct ctx *ctx)
static void pcap_to_xmit(struct ctx *ctx)
{
- __label__ out;
uint8_t *out = NULL;
int irq, ifindex, fd = 0, ret;
unsigned int size, it = 0;
@@ -309,8 +308,7 @@ static void pcap_to_xmit(struct ctx *ctx)
}
}
- out:
-
+out:
bug_on(gettimeofday(&end, NULL));
timersub(&end, &start, &diff);
@@ -411,8 +409,6 @@ static void receive_to_xmit(struct ctx *ctx)
while (likely(sigint == 0)) {
while (user_may_pull_from_rx(rx_ring.frames[it_in].iov_base)) {
- __label__ next;
-
hdr_in = rx_ring.frames[it_in].iov_base;
in = ((uint8_t *) hdr_in) + hdr_in->tp_h.tp_mac;
@@ -463,8 +459,7 @@ static void receive_to_xmit(struct ctx *ctx)
}
}
- next:
-
+next:
kernel_may_pull_from_rx(&hdr_in->tp_h);
it_in++;
@@ -482,8 +477,7 @@ static void receive_to_xmit(struct ctx *ctx)
}
}
- out:
-
+out:
timer_purge();
sock_rx_net_stats(rx_sock, 0);
@@ -537,7 +531,6 @@ static void translate_pcap_to_txf(int fdo, uint8_t *out, size_t len)
static void read_pcap(struct ctx *ctx)
{
- __label__ out;
uint8_t *out;
int ret, fd, fdo = 0;
unsigned long trunced = 0;
@@ -830,7 +823,6 @@ static void walk_t3_block(struct block_desc *pbd, struct ctx *ctx,
sll = (void *) ((uint8_t *) hdr + TPACKET_ALIGN(sizeof(*hdr)));
for (i = 0; i < num_pkts && likely(sigint == 0); ++i) {
- __label__ next;
packet = ((uint8_t *) hdr + hdr->tp_mac);
if (ctx->packet_type != -1)
@@ -852,8 +844,7 @@ static void walk_t3_block(struct block_desc *pbd, struct ctx *ctx,
dissector_entry_point(packet, hdr->tp_snaplen, ctx->link_type,
ctx->print_mode);
- next:
-
+next:
hdr = (void *) ((uint8_t *) hdr + hdr->tp_next_offset);
sll = (void *) ((uint8_t *) hdr + TPACKET_ALIGN(sizeof(*hdr)));