From: Michał Górny Date: Thu, 26 Jul 2018 11:09:59 +0000 (+0200) Subject: desktop.eclass: domenu, fix potential overflow in exit status X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=0197559dcb99c91ddaa146322f5100c326e9d5eb;p=gentoo.git desktop.eclass: domenu, fix potential overflow in exit status While increasing exit status for each failure may seem brilliant at first, it serves no purpose and has an overflow risk. For example, if domenu counted 256 failures, the exit status would be truncated to 0 (success). --- diff --git a/eclass/desktop.eclass b/eclass/desktop.eclass index 1684a21d21f7..8f2c6d55c293 100644 --- a/eclass/desktop.eclass +++ b/eclass/desktop.eclass @@ -251,11 +251,11 @@ domenu() { if [[ -d ${i} ]] ; then for j in "${i}"/*.desktop ; do doins "${j}" - ((ret+=$?)) + ((ret|=$?)) done else doins "${i}" - ((ret+=$?)) + ((ret|=$?)) fi done exit ${ret}