mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
dbus: Save one level of identation by returning early.
This commit is contained in:
parent
2f3fc2f1d6
commit
3e0e685a8c
2 changed files with 41 additions and 40 deletions
|
|
@ -459,13 +459,15 @@ static void handle_get_profile_by_name(DBusConnection *conn, DBusMessage *msg, v
|
|||
|
||||
static void subscription_cb(pa_core *core, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
|
||||
pa_dbusiface_card *c = userdata;
|
||||
DBusMessage *signal = NULL;
|
||||
|
||||
pa_assert(core);
|
||||
pa_assert((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_CARD);
|
||||
pa_assert(c);
|
||||
|
||||
if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_CHANGE) {
|
||||
DBusMessage *signal = NULL;
|
||||
|
||||
if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) != PA_SUBSCRIPTION_EVENT_CHANGE)
|
||||
return;
|
||||
|
||||
if (c->active_profile != c->card->active_profile) {
|
||||
const char *object_path;
|
||||
|
|
@ -498,7 +500,6 @@ static void subscription_cb(pa_core *core, pa_subscription_event_type_t t, uint3
|
|||
dbus_message_unref(signal);
|
||||
signal = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pa_dbusiface_card *pa_dbusiface_card_new(pa_dbusiface_core *core, pa_card *card) {
|
||||
|
|
|
|||
|
|
@ -268,13 +268,14 @@ static void handle_unload(DBusConnection *conn, DBusMessage *msg, void *userdata
|
|||
|
||||
static void subscription_cb(pa_core *core, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
|
||||
pa_dbusiface_module *m = userdata;
|
||||
DBusMessage *signal = NULL;
|
||||
|
||||
pa_assert(core);
|
||||
pa_assert((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_MODULE);
|
||||
pa_assert(m);
|
||||
|
||||
if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_CHANGE) {
|
||||
DBusMessage *signal = NULL;
|
||||
if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) != PA_SUBSCRIPTION_EVENT_CHANGE)
|
||||
return;
|
||||
|
||||
if (!pa_proplist_equal(m->proplist, m->module->proplist)) {
|
||||
DBusMessageIter msg_iter;
|
||||
|
|
@ -291,7 +292,6 @@ static void subscription_cb(pa_core *core, pa_subscription_event_type_t t, uint3
|
|||
dbus_message_unref(signal);
|
||||
signal = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pa_dbusiface_module *pa_dbusiface_module_new(pa_module *module) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue