diff --git a/NmapOps.cc b/NmapOps.cc index 35b384b33..1596bb79d 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -263,7 +263,7 @@ void NmapOps::Initialize() { generate_random_ips = 0; reference_FPs = NULL; magic_port = 33000 + (get_random_uint() % 31000); - magic_port_set = 0; + magic_port_set = false; timing_level = 3; max_parallelism = 0; min_parallelism = 0; diff --git a/NmapOps.h b/NmapOps.h index 88b3dead6..330ea529f 100644 --- a/NmapOps.h +++ b/NmapOps.h @@ -192,7 +192,7 @@ class NmapOps { FingerPrintDB *reference_FPs; /* Used in the new OS scan system. */ std::vector os_labels_ipv6; u16 magic_port; - unsigned short magic_port_set; /* Was this set by user? */ + bool magic_port_set; /* Was this set by user? */ /* Scan timing/politeness issues */ int timing_level; // 0-5, corresponding to Paranoid, Sneaky, Polite, Normal, Aggressive, Insane diff --git a/nmap.cc b/nmap.cc index f014118ae..5664461ad 100644 --- a/nmap.cc +++ b/nmap.cc @@ -1057,7 +1057,7 @@ void parse_options(int argc, char **argv) { case 'f': o.fragscan += 8; break; case 'g': o.magic_port = atoi(optarg); - o.magic_port_set = 1; + o.magic_port_set = true; if (o.magic_port == 0) error("WARNING: a source port of zero may not work on all systems."); break; case 'h': printusage(0); break;