1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 09:59:04 +00:00

Make NewTargets::push() return 1 if the target is already in the queue to avoid returning 0 (error code).

This commit is contained in:
djalal
2010-09-09 12:56:43 +00:00
parent 72455a613c
commit d2773a09a7

View File

@@ -605,6 +605,10 @@ unsigned long NewTargets::push (const char *target) {
if (o.debugging > 2)
log_write(LOG_PLAIN, "New Targets: target %s is already in the queue.\n",
tg.c_str());
/* Return 1 when the target is already in the queue,
* this will prevent returning 0 when the target queue
* is empty since no target was added. */
return 1;
}
}