Message ID | d23190507e9c7131481648848d0afd62448226d3.1675276185.git.pav@iki.fi |
---|---|
State | New |
Headers | show |
Series | [BlueZ] media: set default value for BAP endpoint Vendor field | expand |
Hi Pauli, On Wed, Feb 1, 2023 at 10:57 AM Pauli Virtanen <pav@iki.fi> wrote: > > The "Vendor" field is optional, and should have an initialized valid > default value. It is probably a good idea to include logs where the problem is detected. > --- > profiles/audio/media.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/profiles/audio/media.c b/profiles/audio/media.c > index d96367454..a62755f69 100644 > --- a/profiles/audio/media.c > +++ b/profiles/audio/media.c > @@ -2551,7 +2551,7 @@ static void app_register_endpoint(void *data, void *user_data) > const char *uuid; > gboolean delay_reporting = FALSE; > uint8_t codec; > - struct vendor vendor; > + struct vendor vendor = { 0 }; I guess {}; or { 0,0 }; are clearer here since there are 2 fields in the struct, although it is probably safer to go with memset(&vendor, 0, sizeof(vendor)). > struct bt_bap_pac_qos qos; > uint8_t *capabilities = NULL; > int size = 0; > -- > 2.39.1 >
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=717858 ---Test result--- Test Summary: CheckPatch PASS 0.50 seconds GitLint PASS 0.25 seconds BuildEll PASS 26.98 seconds BluezMake PASS 749.00 seconds MakeCheck PASS 11.59 seconds MakeDistcheck PASS 147.49 seconds CheckValgrind PASS 238.95 seconds CheckSmatch PASS 317.56 seconds bluezmakeextell PASS 95.51 seconds IncrementalBuild PASS 610.03 seconds ScanBuild PASS 966.48 seconds --- Regards, Linux Bluetooth
diff --git a/profiles/audio/media.c b/profiles/audio/media.c index d96367454..a62755f69 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -2551,7 +2551,7 @@ static void app_register_endpoint(void *data, void *user_data) const char *uuid; gboolean delay_reporting = FALSE; uint8_t codec; - struct vendor vendor; + struct vendor vendor = { 0 }; struct bt_bap_pac_qos qos; uint8_t *capabilities = NULL; int size = 0;