diff mbox series

[BlueZ] media: set default value for BAP endpoint Vendor field

Message ID d23190507e9c7131481648848d0afd62448226d3.1675276185.git.pav@iki.fi (mailing list archive)
State Superseded
Headers show
Series [BlueZ] media: set default value for BAP endpoint Vendor field | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Pauli Virtanen Feb. 1, 2023, 6:41 p.m. UTC
The "Vendor" field is optional, and should have an initialized valid
default value.
---
 profiles/audio/media.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luiz Augusto von Dentz Feb. 1, 2023, 7:10 p.m. UTC | #1
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
>
bluez.test.bot@gmail.com Feb. 1, 2023, 8:05 p.m. UTC | #2
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 mbox series

Patch

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;