diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-07-26 13:09:59 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-08-09 16:08:38 +0200 |
commit | 0197559dcb99c91ddaa146322f5100c326e9d5eb (patch) | |
tree | 2fc4c2925f55eff24dc70e366671be832e34e99c /eclass/desktop.eclass | |
parent | desktop.eclass: domenu, fix dying on non-existing files (diff) | |
download | gentoo-0197559dcb99c91ddaa146322f5100c326e9d5eb.tar.gz gentoo-0197559dcb99c91ddaa146322f5100c326e9d5eb.tar.bz2 gentoo-0197559dcb99c91ddaa146322f5100c326e9d5eb.zip |
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).
Diffstat (limited to 'eclass/desktop.eclass')
-rw-r--r-- | eclass/desktop.eclass | 4 |
1 files changed, 2 insertions, 2 deletions
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} |