mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
shm: Wrap memfd-specific code in relevant ifdef
Doesn't really affect logic, but Coverity reports this as dead-code, and I figure it makes sense to be consistent about our use of HAVE_MEMFD. CID: 1352045
This commit is contained in:
parent
d0428f47f4
commit
fd2c630e33
1 changed files with 5 additions and 3 deletions
|
|
@ -201,12 +201,14 @@ static int sharedmem_create(pa_shm *m, pa_mem_type_t type, size_t size, mode_t m
|
||||||
|
|
||||||
/* For memfds, we keep the fd open until we pass it
|
/* For memfds, we keep the fd open until we pass it
|
||||||
* to the other PA endpoint over unix domain socket. */
|
* to the other PA endpoint over unix domain socket. */
|
||||||
if (type == PA_MEM_TYPE_SHARED_MEMFD)
|
if (type != PA_MEM_TYPE_SHARED_MEMFD) {
|
||||||
m->fd = fd;
|
|
||||||
else {
|
|
||||||
pa_assert_se(pa_close(fd) == 0);
|
pa_assert_se(pa_close(fd) == 0);
|
||||||
m->fd = -1;
|
m->fd = -1;
|
||||||
}
|
}
|
||||||
|
#if HAVE_MEMFD
|
||||||
|
else
|
||||||
|
m->fd = fd;
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue