2013-11-19 09:27:43

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH 1/2] android/a2sp: trivial: Use NULL for zero pointer

From: Andrei Emeltchenko <[email protected]>

---
android/a2dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/a2dp.c b/android/a2dp.c
index b0cb9b5..7f16be8 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -310,7 +310,7 @@ static sdp_record_t *a2dp_record(void)
features = sdp_data_alloc(SDP_UINT16, &feat);
sdp_attr_add(record, SDP_ATTR_SUPPORTED_FEATURES, features);

- sdp_set_info_attr(record, "Audio Source", 0, 0);
+ sdp_set_info_attr(record, "Audio Source", NULL, NULL);

free(psm);
free(version);
--
1.7.10.4



2013-11-19 10:17:02

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH 1/2] android/a2sp: trivial: Use NULL for zero pointer

Hi Andrei,

On Tue, Nov 19, 2013, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> ---
> android/a2dp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Both patches have been applied (after fixing the obvious typo in the
subject). Thanks.

Johan

2013-11-19 09:27:44

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH 2/2] android/a2dp: Use sdp_data_free for freeing sdp data types

From: Andrei Emeltchenko <[email protected]>

---
android/a2dp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/a2dp.c b/android/a2dp.c
index 7f16be8..74d0082 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -312,8 +312,8 @@ static sdp_record_t *a2dp_record(void)

sdp_set_info_attr(record, "Audio Source", NULL, NULL);

- free(psm);
- free(version);
+ sdp_data_free(psm);
+ sdp_data_free(version);
sdp_list_free(proto[0], NULL);
sdp_list_free(proto[1], NULL);
sdp_list_free(apseq, NULL);
--
1.7.10.4