Merge pull request #1249 from DundarGoc/test

Fixed shellcheck issue SC2015
This commit is contained in:
4s3ti 2021-02-13 23:23:27 +01:00 committed by GitHub
commit f559bfcb9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1810,7 +1810,7 @@ askEncryption(){
cidrToMask(){
# Source: https://stackoverflow.com/a/20767392
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}
}

View file

@ -422,7 +422,7 @@ fi
cidrToMask(){
# Source: https://stackoverflow.com/a/20767392
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}
}