summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKerin Millar <kfm@plushkava.net>2024-08-11 18:09:19 +0100
committerKerin Millar <kfm@plushkava.net>2024-08-17 17:16:36 +0100
commit7e0ce224c81eef7959aedb787d1512c61631a63f (patch)
tree48db9c5b70caa7bbecdfbc80070fc6fe937e83d9
parentAbort sourcing for ksh93 (diff)
downloadgentoo-functions-7e0ce224c81eef7959aedb787d1512c61631a63f.tar.gz
gentoo-functions-7e0ce224c81eef7959aedb787d1512c61631a63f.tar.bz2
gentoo-functions-7e0ce224c81eef7959aedb787d1512c61631a63f.zip
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@plushkava.net>
-rw-r--r--functions.sh1
1 files changed, 1 insertions, 0 deletions
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