From d2773a09a7c72a95fc19cfbfed7ce2c9cde883be Mon Sep 17 00:00:00 2001 From: djalal Date: Thu, 9 Sep 2010 12:56:43 +0000 Subject: [PATCH] Make NewTargets::push() return 1 if the target is already in the queue to avoid returning 0 (error code). --- TargetGroup.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TargetGroup.cc b/TargetGroup.cc index ee5e1d47c..7e294189b 100644 --- a/TargetGroup.cc +++ b/TargetGroup.cc @@ -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; } }