Skip to content

Commit

Permalink
fix(mdadm,update-alternatives): fix leak variable
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Sep 25, 2023
1 parent e3a871d commit 14cd53b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions completions/mdadm
Expand Up @@ -4,7 +4,7 @@ _comp_cmd_mdadm__raid_level()
{
local mode=""

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

_comp_cmd_mdadm__raid_layout()
{
local level=""
local i level=""
for ((i = 1; i < cword; i++)); do
if [[ ${words[i]} == -@(l|-level) ]]; then
level=${words[i + 1]}
Expand Down
2 changes: 1 addition & 1 deletion completions/update-alternatives
Expand Up @@ -2,7 +2,7 @@

_comp_cmd_update_alternatives__installed()
{
local admindir
local i admindir
# find the admin dir
for i in alternatives dpkg/alternatives rpm/alternatives; do
[[ -d /var/lib/$i ]] && admindir=/var/lib/$i && break
Expand Down

0 comments on commit 14cd53b

Please sign in to comment.