Make magic_port_set a bool.

This commit is contained in:
david 2012-08-28 13:07:19 +00:00
parent 676de05f7f
commit 4357a97403
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -192,7 +192,7 @@ class NmapOps {
FingerPrintDB *reference_FPs; /* Used in the new OS scan system. */
std::vector<FingerMatch> 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

View file

@ -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;