mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Merge pull request #1249 from DundarGoc/test
Fixed shellcheck issue SC2015
This commit is contained in:
commit
f559bfcb9f
2 changed files with 2 additions and 2 deletions
|
@ -1810,7 +1810,7 @@ askEncryption(){
|
||||||
cidrToMask(){
|
cidrToMask(){
|
||||||
# Source: https://stackoverflow.com/a/20767392
|
# Source: https://stackoverflow.com/a/20767392
|
||||||
set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
|
set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
|
||||||
[ $1 -gt 1 ] && shift $1 || shift
|
shift $1
|
||||||
echo ${1-0}.${2-0}.${3-0}.${4-0}
|
echo ${1-0}.${2-0}.${3-0}.${4-0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -422,7 +422,7 @@ fi
|
||||||
cidrToMask(){
|
cidrToMask(){
|
||||||
# Source: https://stackoverflow.com/a/20767392
|
# Source: https://stackoverflow.com/a/20767392
|
||||||
set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
|
set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
|
||||||
[ $1 -gt 1 ] && shift $1 || shift
|
shift $1
|
||||||
echo ${1-0}.${2-0}.${3-0}.${4-0}
|
echo ${1-0}.${2-0}.${3-0}.${4-0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue