diff --git a/NmapOps.h b/NmapOps.h index 9f47e3438..fb2769aac 100644 --- a/NmapOps.h +++ b/NmapOps.h @@ -218,7 +218,7 @@ class NmapOps { void setMinRttTimeout(int rtt); void setInitialRttTimeout(int rtt); void setMaxRetransmissions(int max_retransmit); - int getMaxRetransmissions() { return max_retransmissions; } + unsigned int getMaxRetransmissions() { return max_retransmissions; } /* Similar functions for Host group size */ int minHostGroupSz() { return min_host_group_sz; } @@ -373,7 +373,7 @@ class NmapOps { int max_rtt_timeout; int min_rtt_timeout; int initial_rtt_timeout; - int max_retransmissions; + unsigned int max_retransmissions; unsigned int max_tcp_scan_delay; unsigned int max_udp_scan_delay; unsigned int max_sctp_scan_delay; diff --git a/scan_engine.cc b/scan_engine.cc index 0f06ed9b6..072444f6d 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -166,7 +166,7 @@ struct ultra_scan_performance_vars : public scan_performance_vars { /* Try to send a scanping if no response has been received from a target host in this many usecs */ int pingtime; - int tryno_cap; /* The maximum trynumber (starts at zero) allowed */ + unsigned int tryno_cap; /* The maximum trynumber (starts at zero) allowed */ void init() { scan_performance_vars::init(); @@ -1395,7 +1395,7 @@ unsigned int HostScanStats::allowedTryno(bool *capped, bool *mayincrease) { /* TODO: This should perhaps differ by scan type. */ maxval = MAX(1, max_successful_tryno + 1); - if (maxval > (unsigned int) USI->perf.tryno_cap) { + if (maxval > USI->perf.tryno_cap) { if (capped) *capped = true; maxval = USI->perf.tryno_cap; @@ -2456,7 +2456,7 @@ static u16 sport_encode(UltraScanInfo *USI, u16 base_portno, unsigned int trynum otherwise. */ static bool sport_decode(const UltraScanInfo *USI, u16 base_portno, u16 portno, unsigned int *trynum, unsigned int *pingseq) { - int t; + unsigned int t; t = portno - base_portno; if (t > USI->perf.tryno_cap + 256) { diff --git a/traceroute.cc b/traceroute.cc index 7e0cc76e9..88595df8f 100644 --- a/traceroute.cc +++ b/traceroute.cc @@ -273,7 +273,7 @@ private: /* This is incremented with each instantiated probe. */ static u16 token_counter; - int num_resends; + unsigned int num_resends; public: HostState *host;