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 002A1138350 for ; Tue, 18 Feb 2020 14:32:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 324F6E08B0; Tue, 18 Feb 2020 14:32:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 17E29E08B0 for ; Tue, 18 Feb 2020 14:32:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9AB8A34ECFB for ; Tue, 18 Feb 2020 14:32:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 994C59C for ; Tue, 18 Feb 2020 14:32:02 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1582036305.1a05e3a4ad8c8948465e22509b356e191b90789a.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/portability.eclass X-VCS-Directories: eclass/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 1a05e3a4ad8c8948465e22509b356e191b90789a X-VCS-Branch: master Date: Tue, 18 Feb 2020 14:32:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c7146c70-8311-4b82-880d-26936d466511 X-Archives-Hash: cd8b3b923168bd622f313071bb6d270e commit: 1a05e3a4ad8c8948465e22509b356e191b90789a Author: Sergei Trofimovich gentoo org> AuthorDate: Tue Feb 18 14:30:43 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Tue Feb 18 14:31:45 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a05e3a4 portability.eclass: avoid lexicographic number comparison, bug #705250 Closes: https://bugs.gentoo.org/705250 Signed-off-by: Sergei Trofimovich gentoo.org> eclass/portability.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/portability.eclass b/eclass/portability.eclass index c56f03fb876..1402c0420cb 100644 --- a/eclass/portability.eclass +++ b/eclass/portability.eclass @@ -67,8 +67,8 @@ seq() { # Screw it, do the output ourselves while :; do - [[ $max < $min && $step > 0 ]] && break - [[ $min < $max && $step < 0 ]] && break + [[ $max -lt $min && $step -gt 0 ]] && break + [[ $min -lt $max && $step -gt 0 ]] && break echo $min : $(( min += step )) done