mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
ALSA: compress: Memset timestamp structure to zero
snd_compr_tstamp is initialized using aggregate initialization that does not zero out the padded bytes. Initialize timestamp structure to zero using memset to avoid this. CRs-Fixed: 568717 Change-Id: I7a7d188705161f06201f1a1f2945bb6acd633d5d Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
b3396c087d
commit
351d7321e8
1 changed files with 7 additions and 1 deletions
|
|
@ -657,8 +657,14 @@ snd_compr_set_metadata(struct snd_compr_stream *stream, unsigned long arg)
|
|||
static inline int
|
||||
snd_compr_tstamp(struct snd_compr_stream *stream, unsigned long arg)
|
||||
{
|
||||
struct snd_compr_tstamp tstamp = {0};
|
||||
int ret;
|
||||
#ifdef AUDIO_QGKI
|
||||
struct snd_compr_tstamp tstamp;
|
||||
|
||||
memset(&tstamp, 0, sizeof(tstamp));
|
||||
#else
|
||||
struct snd_compr_tstamp tstamp = {0};
|
||||
#endif
|
||||
|
||||
ret = snd_compr_update_tstamp(stream, &tstamp);
|
||||
if (ret == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue