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-24 11:34:12 -0700
commit454cf9541bec94006c063f5ff4115a5bf5b416bb (patch)
treee26df68817ce2c9ef33e28555d10d13589ae0619 /bin
parentb6a70de78497a3e9e62d524ec3e355355b913efb (diff)
downloadportage-454cf9541bec94006c063f5ff4115a5bf5b416bb.tar.gz
portage-454cf9541bec94006c063f5ff4115a5bf5b416bb.tar.bz2
portage-454cf9541bec94006c063f5ff4115a5bf5b416bb.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}"