backend-native: Fix indentation and whitespace style

Replace tabs with spaces, remove trailing whitespace, remove bracing
around single-line `if` blocks.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
This commit is contained in:
Marijn Suijten 2022-08-02 11:35:14 +02:00 committed by Tanu Kaskinen
parent de8b0c1124
commit c6bd6656a2

View file

@ -638,7 +638,7 @@ static bool hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, const char *buf
indicator = 1;
while ((r = pa_split_in_place(str, ",", &len, &state))) {
/* Ignore updates to mandantory indicators which are always ON */
/* Ignore updates to mandatory indicators which are always ON */
if (indicator == CIND_CALL_INDICATOR
|| indicator == CIND_CALL_SETUP_INDICATOR
|| indicator == CIND_CALL_HELD_INDICATOR)
@ -712,9 +712,8 @@ static bool hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, const char *buf
} else if ((c->state == 2 || c->state == 3) && pa_startswith(buf, "AT+CMER=")) {
if (sscanf(buf, "AT+CMER=%d,%*d,%*d,%d", &mode, &val) == 2) {
/* Bluetooth HFP spec only defines mode == 3 */
if (mode != 3) {
if (mode != 3)
pa_log_warn("Unexpected mode for AT+CMER: %d", mode);
}
/* Configure CMER event reporting */
discovery->native_backend->cmer_indicator_reporting_enabled = !!val;
@ -815,7 +814,7 @@ static bool hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, const char *buf
return true;
}
static int get_rfcomm_fd (pa_bluetooth_discovery *discovery) {
static int get_rfcomm_fd(pa_bluetooth_discovery *discovery) {
struct pa_bluetooth_transport *t;
struct transport_data *trd = NULL;
void *state = NULL;
@ -852,7 +851,7 @@ static pa_hook_result_t host_battery_level_changed_cb(pa_bluetooth_discovery *y,
pa_assert(b);
/* Get RFCOMM channel if available */
rfcomm_fd = get_rfcomm_fd (y);
rfcomm_fd = get_rfcomm_fd(y);
if (rfcomm_fd < 0)
return PA_HOOK_OK;