summaryrefslogtreecommitdiff
path: root/android/hal-audio-aptx.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-09-25 15:05:59 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-09-25 15:05:59 +0200
commit43e4419a743263b89416c4448b8d22e72b91c6ac (patch)
treed1a97648e73ee1079dea3126f1a30f7dccf7da8a /android/hal-audio-aptx.c
parent508e129d75782f2dfe0edf05973c24af6b91f633 (diff)
downloadbluez-43e4419a743263b89416c4448b8d22e72b91c6ac.tar.gz
android: Replace new0 with malloc call
Diffstat (limited to 'android/hal-audio-aptx.c')
-rw-r--r--android/hal-audio-aptx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/hal-audio-aptx.c b/android/hal-audio-aptx.c
index 09636b8b7..a8000759b 100644
--- a/android/hal-audio-aptx.c
+++ b/android/hal-audio-aptx.c
@@ -24,7 +24,6 @@
#include "audio-msg.h"
#include "hal-audio.h"
#include "hal-log.h"
-#include "src/shared/util.h"
#include "profiles/audio/a2dp-codecs.h"
#define APTX_SO_NAME "libbt-aptx.so"
@@ -157,10 +156,11 @@ static bool aptx_codec_init(struct audio_preset *preset, uint16_t payload_len,
return false;
}
- aptx_data = new0(struct aptx_data, 1);
+ aptx_data = malloc(sizeof(*aptx_data));
if (!aptx_data)
return false;
+ memset(aptx_data, 0, sizeof(*aptx_data));
memcpy(&aptx_data->aptx, preset->data, preset->len);
aptx_data->enc = calloc(1, aptx_btencsize);