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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9A442158090 for ; Sat, 5 Oct 2024 04:15:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B489E29CF; Sat, 5 Oct 2024 04:15:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CAA92E29CB for ; Sat, 5 Oct 2024 04:15:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 63B7D340C42 for ; Sat, 5 Oct 2024 04:15:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AFBC01F64 for ; Sat, 5 Oct 2024 04:15:21 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1723911396.7e0ce224c81eef7959aedb787d1512c61631a63f.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: functions.sh X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 7e0ce224c81eef7959aedb787d1512c61631a63f X-VCS-Branch: master Date: Sat, 5 Oct 2024 04:15:21 +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: 1be22767-c862-469e-942c-4aa48eb52f50 X-Archives-Hash: 11c99577d0c001c13a8dbb39a07f2242 commit: 7e0ce224c81eef7959aedb787d1512c61631a63f Author: Kerin Millar plushkava net> AuthorDate: Sun Aug 11 17:09:19 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Aug 17 16:16:36 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=7e0ce224 Explicitly initialise a local variable in _update_pid() I normally always do this for local variables that may immediately be checked for emptiness or non-emptiness, owing to the formally unspecified behaviour of the local command. Signed-off-by: Kerin Millar plushkava.net> functions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/functions.sh b/functions.sh index b618054..8b7896f 100644 --- a/functions.sh +++ b/functions.sh @@ -905,6 +905,7 @@ _update_pid() { local dir tid + tid= for dir in /proc/self/task/*/; do if [ "${tid}" ] || [ ! -e "${dir}" ]; then return 1