Skip to content

Commit 36785cc

Browse files
committed
shellcheck: drop duplicate bt_in_whitelist in lib_bluetooth
Remove a shadowed duplicate definition of bt_in_whitelist() in lib_bluetooth.sh to address ShellCheck SC2317 without changing behavior. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent e2005a1 commit 36785cc

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

Runner/utils/lib_bluetooth.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,6 @@ retry_command_bt() {
8585
return 1
8686
}
8787

88-
# Check if a device (MAC or Name) is in the whitelist
89-
bt_in_whitelist() {
90-
device_name="$1"
91-
device_mac="$2"
92-
93-
whitelist_value="${WHITELIST:-}"
94-
log_info "Checking if MAC='$device_mac' or NAME='$device_name' is in whitelist: '$whitelist_value'"
95-
96-
echo "$whitelist_value" | tr -s ' ' '\n' | while IFS= read -r allowed; do
97-
if [ "$allowed" = "$device_mac" ] || [ "$allowed" = "$device_name" ]; then
98-
log_info "MAC or NAME matched and allowed: $allowed"
99-
return 0
100-
fi
101-
done
102-
103-
log_info "MAC matched but neither MAC nor NAME in whitelist"
104-
return 1
105-
}
106-
10788
# bt_parse_whitelist <whitelist_file>
10889
# Reads a whitelist file where each line has:
10990
bt_parse_whitelist() {

0 commit comments

Comments
 (0)