Skip to content

Commit 14cd53b

Browse files
committed
fix(mdadm,update-alternatives): fix leak variable
1 parent e3a871d commit 14cd53b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

completions/mdadm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ _comp_cmd_mdadm__raid_level()
44
{
55
local mode=""
66

7-
local noargopts='!(-*|*[CB]*)'
7+
local i noargopts='!(-*|*[CB]*)'
88
for ((i = 1; i < cword; i++)); do
99
# shellcheck disable=SC2254
1010
case ${words[i]} in
@@ -33,7 +33,7 @@ _comp_cmd_mdadm__raid_level()
3333

3434
_comp_cmd_mdadm__raid_layout()
3535
{
36-
local level=""
36+
local i level=""
3737
for ((i = 1; i < cword; i++)); do
3838
if [[ ${words[i]} == -@(l|-level) ]]; then
3939
level=${words[i + 1]}

completions/update-alternatives

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
_comp_cmd_update_alternatives__installed()
44
{
5-
local admindir
5+
local i admindir
66
# find the admin dir
77
for i in alternatives dpkg/alternatives rpm/alternatives; do
88
[[ -d /var/lib/$i ]] && admindir=/var/lib/$i && break

0 commit comments

Comments
 (0)