diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/module-esound-compat-spawnfd.c | 2 | ||||
-rw-r--r-- | src/modules/module-mmkbd-evdev.c | 2 | ||||
-rw-r--r-- | src/modules/module-oss.c | 8 | ||||
-rw-r--r-- | src/modules/module-pipe-sink.c | 2 | ||||
-rw-r--r-- | src/modules/module-pipe-source.c | 2 | ||||
-rw-r--r-- | src/modules/oss-util.c | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/module-esound-compat-spawnfd.c b/src/modules/module-esound-compat-spawnfd.c index 890ebb16..46235c09 100644 --- a/src/modules/module-esound-compat-spawnfd.c +++ b/src/modules/module-esound-compat-spawnfd.c @@ -65,7 +65,7 @@ int pa__init(pa_module*m) { if (pa_loop_write(fd, &x, sizeof(x), NULL) != sizeof(x)) pa_log_warn("WARNING: write(%u, 1, 1) failed: %s", fd, pa_cstrerror(errno)); - close(fd); + pa_assert_se(pa_close(fd) == 0); pa_module_unload_request(m); diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c index 03394c0a..dc0b1c1a 100644 --- a/src/modules/module-mmkbd-evdev.c +++ b/src/modules/module-mmkbd-evdev.c @@ -254,7 +254,7 @@ void pa__done(pa_module*m) { m->core->mainloop->io_free(u->io); if (u->fd >= 0) - close(u->fd); + pa_assert_se(pa_close(u->fd) == 0); pa_xfree(u->sink_name); pa_xfree(u); diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c index 9273a393..ffecd394 100644 --- a/src/modules/module-oss.c +++ b/src/modules/module-oss.c @@ -476,7 +476,7 @@ static int suspend(struct userdata *u) { /* Let's suspend */ ioctl(u->fd, SNDCTL_DSP_SYNC, NULL); - close(u->fd); + pa_close(u->fd); u->fd = -1; if (u->rtpoll_item) { @@ -588,7 +588,7 @@ static int unsuspend(struct userdata *u) { return 0; fail: - close(u->fd); + pa_close(u->fd); u->fd = -1; return -1; } @@ -1324,7 +1324,7 @@ fail: if (u) pa__done(m); else if (fd >= 0) - close(fd); + pa_close(fd); if (ma) pa_modargs_free(ma); @@ -1391,7 +1391,7 @@ void pa__done(pa_module*m) { munmap(u->out_mmap, u->out_hwbuf_size); if (u->fd >= 0) - close(u->fd); + pa_close(u->fd); pa_xfree(u->device_name); diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c index 5cafaada..61454261 100644 --- a/src/modules/module-pipe-sink.c +++ b/src/modules/module-pipe-sink.c @@ -335,7 +335,7 @@ void pa__done(pa_module*m) { } if (u->fd >= 0) - close(u->fd); + pa_assert_se(pa_close(u->fd) == 0); pa_xfree(u); } diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c index 291010e1..68c89a0d 100644 --- a/src/modules/module-pipe-source.c +++ b/src/modules/module-pipe-source.c @@ -313,7 +313,7 @@ void pa__done(pa_module*m) { } if (u->fd >= 0) - close(u->fd); + pa_assert_se(pa_close(u->fd) == 0); pa_xfree(u); } diff --git a/src/modules/oss-util.c b/src/modules/oss-util.c index 5a939cf8..36498809 100644 --- a/src/modules/oss-util.c +++ b/src/modules/oss-util.c @@ -68,7 +68,7 @@ int pa_oss_open(const char *device, int *mode, int* pcaps) { pa_log_warn("'%s' doesn't support full duplex", device); - close(fd); + pa_close(fd); } if ((fd = open(device, (*mode = O_WRONLY)|O_NDELAY|O_NOCTTY)) < 0) { @@ -147,7 +147,7 @@ success: fail: if (fd >= 0) - close(fd); + pa_close(fd); return -1; } |