Fixed shellcheck warnings SC2178 and SC2128.

SC2178: Variable was used as an array but is now assigned a string.
SC2128: Expanding an array without an index only gives the first element.

It's apparently a known bug that shellcheck can't both declare a
variable local and assign a value to it without raising this issue.
https://github.com/koalaman/shellcheck/wiki/SC2178
This commit is contained in:
Dundar Göc 2021-02-14 14:23:01 +01:00
parent 58af83b882
commit 9cdca47689

View file

@ -689,7 +689,8 @@ validIP(){
}
validIPAndNetmask(){
local ip=$1
local ip
ip=$1
local stat=1
ip="${ip/\//.}"