summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2010-10-24 10:58:59 +0200
committerZac Medico <zmedico@gentoo.org>2010-10-27 07:37:18 -0700
commit787412ce791d896ef37f449ab1805294355561ac (patch)
treed6942a4d557903f5ed0b1c292737fa82cd51eff5 /bin
parent493bb457ec508f75a756b92d98d5ef0f29da20ce (diff)
downloadportage-787412ce791d896ef37f449ab1805294355561ac.tar.gz
portage-787412ce791d896ef37f449ab1805294355561ac.tar.bz2
portage-787412ce791d896ef37f449ab1805294355561ac.zip
Simplify retval checks in has_version() and best_version().
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh14
1 files changed, 4 insertions, 10 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index c7f81c50e..e67dd6366 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -188,11 +188,8 @@ has_version() {
fi
local retval=$?
case "${retval}" in
- 0)
- return 0
- ;;
- 1)
- return 1
+ 0|1)
+ return ${retval}
;;
*)
die "unexpected portageq exit code: ${retval}"
@@ -230,11 +227,8 @@ best_version() {
fi
local retval=$?
case "${retval}" in
- 0)
- return 0
- ;;
- 1)
- return 1
+ 0|1)
+ return ${retval}
;;
*)
die "unexpected portageq exit code: ${retval}"