mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-28 05:40:23 -04:00
pcm: fix for the unitialized write buffer
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
df621629d8
commit
a53c2b25f1
2 changed files with 4 additions and 4 deletions
|
|
@ -530,7 +530,7 @@ transport_ops_t pcm_shm_ops = {
|
|||
static int ctl_handler(waiter_t *waiter, unsigned short events)
|
||||
{
|
||||
client_t *client = waiter->private_data;
|
||||
char buf[1];
|
||||
char buf[1] = "";
|
||||
ssize_t n;
|
||||
if (events & POLLIN) {
|
||||
n = write(client->poll_fd, buf, 1);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ static long snd_pcm_shm_action_fd0(snd_pcm_t *pcm, int *fd)
|
|||
{
|
||||
snd_pcm_shm_t *shm = pcm->private_data;
|
||||
int err;
|
||||
char buf[1];
|
||||
char buf[1] = "";
|
||||
volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
|
||||
|
||||
err = write(shm->socket, buf, 1);
|
||||
|
|
@ -113,7 +113,7 @@ static long snd_pcm_shm_action(snd_pcm_t *pcm)
|
|||
{
|
||||
snd_pcm_shm_t *shm = pcm->private_data;
|
||||
int err, result;
|
||||
char buf[1];
|
||||
char buf[1] = "";
|
||||
volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
|
||||
|
||||
if (ctrl->hw.changed || ctrl->appl.changed)
|
||||
|
|
@ -148,7 +148,7 @@ static long snd_pcm_shm_action_fd(snd_pcm_t *pcm, int *fd)
|
|||
{
|
||||
snd_pcm_shm_t *shm = pcm->private_data;
|
||||
int err;
|
||||
char buf[1];
|
||||
char buf[1] = "";
|
||||
volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
|
||||
|
||||
if (ctrl->hw.changed || ctrl->appl.changed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue