commit:     7e0ce224c81eef7959aedb787d1512c61631a63f
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Aug 11 17:09:19 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <kfm <AT> 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

Reply via email to