commit:     e51781a883977c164bc344e071e1f99d1a1af17f
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Jun  8 13:32:43 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  8 13:36:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e51781a8

helper-functions.sh: ensure __multijob_finish() returns numerically

In the course of making a minor change to the __multijob_finish()
function - intended to idiomatically employ the (( … )) command - the
initial assignment of 0 to the 'ret' variable was inadvertently removed.
Since it may not otherwise be assigned, the following error may arise.

helper-functions.sh: line 64: return: : numeric argument

Restore the assignment.

Fixes: 0581fbc0421e88d3ef01b55ab864803070be3d96
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/helper-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/helper-functions.sh b/bin/helper-functions.sh
index 1ba3630a56..cc18d9053d 100644
--- a/bin/helper-functions.sh
+++ b/bin/helper-functions.sh
@@ -53,7 +53,7 @@ __multijob_finish_one() {
 }
 
 __multijob_finish() {
-       local ret
+       local ret=0
 
        while (( mj_num_jobs > 0 )); do
                __multijob_finish_one

Reply via email to