mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
This commit is contained in:
@@ -285,7 +285,7 @@ bool target_needs_new_hostgroup(Target **targets, int targets_sz, const Target *
|
||||
The target_expressions array MUST REMAIN VALID IN MEMORY as long as
|
||||
this class instance is used -- the array is NOT copied.
|
||||
*/
|
||||
HostGroupState::HostGroupState(int lookahead, int rnd, int num_random, int argc, const char **argv) {
|
||||
HostGroupState::HostGroupState(int lookahead, int rnd, unsigned long num_random, int argc, const char **argv) {
|
||||
assert(lookahead > 0);
|
||||
this->argc = argc;
|
||||
this->argv = argv;
|
||||
@@ -296,7 +296,7 @@ HostGroupState::HostGroupState(int lookahead, int rnd, int num_random, int argc,
|
||||
current_batch_sz = 0;
|
||||
next_batch_no = 0;
|
||||
randomize = rnd;
|
||||
if (num_random > 0) {
|
||||
if (num_random >= 0) {
|
||||
current_group.generate_random_ips(num_random);
|
||||
}
|
||||
}
|
||||
@@ -414,8 +414,8 @@ bail:
|
||||
}
|
||||
|
||||
bool HostGroupState::get_next_host(struct sockaddr_storage *ss, size_t *sslen, struct addrset *exclude_group) {
|
||||
int num_queued = o.numhosts_scanned + current_batch_sz;
|
||||
if (o.max_ips_to_scan > 0 && num_queued >= (int)o.max_ips_to_scan) {
|
||||
unsigned long num_queued = o.numhosts_scanned + current_batch_sz;
|
||||
if (o.max_ips_to_scan > 0 && num_queued >= o.max_ips_to_scan) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user