Fixed O_NONBLOCK

This commit is contained in:
Abramo Bagnara 2001-04-28 18:40:05 +00:00
parent e74a7322ca
commit b8abb93bb7
3 changed files with 6 additions and 6 deletions

View file

@ -101,9 +101,9 @@ int snd_hwdep_block_mode(snd_hwdep_t *hwdep, int enable)
if ((flags = fcntl(hwdep->fd, F_GETFL)) < 0)
return -errno;
if (enable)
flags &= ~O_NONBLOCK;
else
flags |= O_NONBLOCK;
else
flags &= ~O_NONBLOCK;
if (fcntl(hwdep->fd, F_SETFL, flags) < 0)
return -errno;
return 0;