OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
508e129
)
android: Replace new0 with malloc call
author
Marcel Holtmann
<marcel@holtmann.org>
Thu, 25 Sep 2014 13:05:59 +0000
(15:05 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 25 Sep 2014 13:05:59 +0000
(15:05 +0200)
android/hal-audio-aptx.c
patch
|
blob
|
history
diff --git
a/android/hal-audio-aptx.c
b/android/hal-audio-aptx.c
index
09636b8
..
a800075
100644
(file)
--- 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);