diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-12-05 19:28:23 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2019-12-05 19:28:23 +0100 |
commit | 79ab49285ecf23a7b1e5179e5b4cd59ee58bb282 (patch) | |
tree | 49e0bac4aa7daae21581cfd0f79c8b55ae61bebc | |
parent | a3d99b2774bb37061f247535945573bd0f218230 (diff) |
removed superfluous explicit numeric casts
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | src/pkt.c | 7 | ||||
-rw-r--r-- | src/pkt.h | 2 | ||||
-rw-r--r-- | src/ptunnel.c | 2 |
3 files changed, 6 insertions, 5 deletions
@@ -122,8 +122,9 @@ void handle_packet(char *buf, unsigned bytes, int is_pcap, struct sockaddr_in *a if (!is_pcap) cur->xfer.icmp_in++; } - else + else { type_flag = kProxy_flag; + } pkt_flag = pt_pkt->state & kFlag_mask; pt_pkt->state &= ~kFlag_mask; @@ -315,7 +316,7 @@ void handle_packet(char *buf, unsigned bytes, int is_pcap, struct sockaddr_in *a } handle_data(pkt, bytes, cur, 0); } - handle_ack((uint16_t)pt_pkt->ack, cur); + handle_ack(pt_pkt->ack, cur); cur->last_activity = now; } } @@ -462,7 +463,7 @@ void handle_extended_options(proxy_desc_t *cur) } } -void handle_ack(uint16_t seq_no, proxy_desc_t *cur) +void handle_ack(uint32_t seq_no, proxy_desc_t *cur) { if (cur->send_wait_ack > 0) { int i, can_ack = 0, count = 0; @@ -142,6 +142,6 @@ void handle_data(icmp_echo_packet_t *pkt, int total_len, proxy_desc_t *cur, int void handle_extended_options(proxy_desc_t *cur); -void handle_ack(uint16_t seq_no, proxy_desc_t *cur); +void handle_ack(uint32_t seq_no, proxy_desc_t *cur); #endif diff --git a/src/ptunnel.c b/src/ptunnel.c index dde63d3..a8c0a40 100644 --- a/src/ptunnel.c +++ b/src/ptunnel.c @@ -385,7 +385,7 @@ void pt_forwarder(void) { } } addr = dest_addr; - rand_id = (uint16_t) pt_random(); + rand_id = pt_random(); create_and_insert_proxy_desc(rand_id, rand_id, new_sock, &addr, opts.given_dst_ip, opts.given_dst_port, kProxy_start, kUser_flag); pthread_mutex_unlock(&num_threads_lock); } |