Declaring all local variables under the function declaration line (#5219)

pull/5220/head
Dan Schaper 1 year ago committed by GitHub
commit c255082ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -97,7 +97,7 @@ scanList(){
} }
scanDatabaseTable() { scanDatabaseTable() {
local domain table list_type querystr result extra local domain table list_type querystr result extra abpquerystr abpfound abpentry searchstr
domain="$(printf "%q" "${1}")" domain="$(printf "%q" "${1}")"
table="${2}" table="${2}"
list_type="${3:-}" list_type="${3:-}"
@ -107,7 +107,6 @@ scanDatabaseTable() {
# behavior. The "ESCAPE '\'" clause specifies that an underscore preceded by an '\' should be matched # behavior. The "ESCAPE '\'" clause specifies that an underscore preceded by an '\' should be matched
# as a literal underscore character. We pretreat the $domain variable accordingly to escape underscores. # as a literal underscore character. We pretreat the $domain variable accordingly to escape underscores.
if [[ "${table}" == "gravity" ]]; then if [[ "${table}" == "gravity" ]]; then
local abpquerystr abpfound abpentry searchstr
# Are there ABP entries on gravity? # Are there ABP entries on gravity?
# Return 1 if abp_domain=1 or Zero if abp_domain=0 or not set # Return 1 if abp_domain=1 or Zero if abp_domain=0 or not set

Loading…
Cancel
Save