From 787412ce791d896ef37f449ab1805294355561ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 24 Oct 2010 10:58:59 +0200 Subject: Simplify retval checks in has_version() and best_version(). --- bin/ebuild.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'bin/ebuild.sh') 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}" -- cgit v1.2.3-1-g7c22