Fixed for fcntl calls (NONBLOCK)...

This commit is contained in:
Jaroslav Kysela 1999-01-06 15:25:15 +00:00
parent dc6d1ffeb0
commit 54c4a6c610
5 changed files with 9 additions and 8 deletions

View file

@ -134,13 +134,13 @@ int snd_seq_block_mode(void *handle, int enable)
seq = (snd_seq_t *) handle;
if (!seq)
return -EINVAL;
if (fcntl(seq->fd, F_GETFL, &flags) < 0)
if ((flags = fcntl(seq->fd, F_GETFL)) < 0)
return -errno;
if (enable)
flags |= O_NONBLOCK;
else
flags &= ~O_NONBLOCK;
if (fcntl(seq->fd, F_SETFL, &flags) < 0)
if (fcntl(seq->fd, F_SETFL, flags) < 0)
return -errno;
return 0;
}