From 454cf9541bec94006c063f5ff4115a5bf5b416bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 24 Oct 2010 10:58:59 +0200 Subject: [PATCH] Simplify retval checks in has_version() and best_version(). --- bin/ebuild.sh | 14 ++++---------- 1 file 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}" -- 2.26.2