Commit a87ff81a authored by pali's avatar pali Committed by Marijn Suijten

bluetooth: Do not use sizeof(type) but rather sizeof(variable)

parent 120a70f0
...@@ -1907,7 +1907,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro ...@@ -1907,7 +1907,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
description = _("Headset Audio Gateway (HSP)"); description = _("Headset Audio Gateway (HSP)");
else else
description = _("Headset Audio Gateway (HFP)"); description = _("Headset Audio Gateway (HFP)");
cp = pa_card_profile_new(name, description, sizeof(pa_bluetooth_profile_t)); cp = pa_card_profile_new(name, description, sizeof(*cp));
cp->priority = profile; cp->priority = profile;
cp->n_sinks = 1; cp->n_sinks = 1;
cp->n_sources = 1; cp->n_sources = 1;
...@@ -1927,7 +1927,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro ...@@ -1927,7 +1927,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
else else
description = pa_sprintf_malloc(_("High Fidelity Capture (A2DP Source) with codec %s"), a2dp_codec->description); description = pa_sprintf_malloc(_("High Fidelity Capture (A2DP Source) with codec %s"), a2dp_codec->description);
cp = pa_card_profile_new(name, description, sizeof(pa_bluetooth_profile_t)); cp = pa_card_profile_new(name, description, sizeof(*cp));
pa_xfree(description); pa_xfree(description);
cp->priority = profile; cp->priority = profile;
...@@ -2195,7 +2195,7 @@ static int add_card(struct userdata *u) { ...@@ -2195,7 +2195,7 @@ static int add_card(struct userdata *u) {
pa_assert(!pa_hashmap_isempty(data.profiles)); pa_assert(!pa_hashmap_isempty(data.profiles));
cp = pa_card_profile_new("off", _("Off"), sizeof(pa_bluetooth_profile_t)); cp = pa_card_profile_new("off", _("Off"), sizeof(*cp));
cp->available = PA_AVAILABLE_YES; cp->available = PA_AVAILABLE_YES;
p = PA_CARD_PROFILE_DATA(cp); p = PA_CARD_PROFILE_DATA(cp);
*p = PA_BLUETOOTH_PROFILE_OFF; *p = PA_BLUETOOTH_PROFILE_OFF;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment