From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 187041382C5 for ; Thu, 8 Mar 2018 17:06:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 218BEE0A01; Thu, 8 Mar 2018 17:05:58 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C9F74E09FA for ; Thu, 8 Mar 2018 17:05:57 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id F2549335C06; Thu, 8 Mar 2018 17:05:55 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 2/8] linux-info.eclass: Replace unnecessary $? checks Date: Thu, 8 Mar 2018 18:05:42 +0100 Message-Id: <20180308170548.5782-3-mgorny@gentoo.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180308170548.5782-1-mgorny@gentoo.org> References: <20180308170548.5782-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 0ef5a064-151f-4618-be6f-37a1635cd5c3 X-Archives-Hash: 744b2bf6c3c77e6cea28850b942dabf8 --- eclass/linux-info.eclass | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index b8c1a524bae8..df6227220b79 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -628,8 +628,7 @@ get_running_version() { # This attempts to find the version of the sources, and otherwise falls back to # the version of the running kernel. linux-info_get_any_version() { - get_version - if [[ $? -ne 0 ]]; then + if ! get_version; then ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version" get_running_version fi @@ -848,13 +847,11 @@ check_zlibinflate() { ebegin "checking ZLIB_INFLATE" linux_chkconfig_builtin CONFIG_ZLIB_INFLATE - eend $? - [ "$?" != 0 ] && die + eend $? || die ebegin "checking ZLIB_DEFLATE" linux_chkconfig_builtin CONFIG_ZLIB_DEFLATE - eend $? - [ "$?" != 0 ] && die + eend $? || die local LINENO_START local LINENO_END -- 2.16.2