From: Michał Górny Date: Sun, 24 Oct 2010 08:58:59 +0000 (+0200) Subject: Simplify retval checks in has_version() and best_version(). X-Git-Tag: v2.2.0_alpha2~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=454cf9541bec94006c063f5ff4115a5bf5b416bb;p=portage.git Simplify retval checks in has_version() and best_version(). --- 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}"