On Wed, 2016-08-10 at 21:44 +0530, Arun Raghavan wrote: > 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 > --- > Â src/pulsecore/shm.c | 8 +++++--- > Â 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c > index 9dea0a5..8bd7ed7 100644 > --- a/src/pulsecore/shm.c > +++ b/src/pulsecore/shm.c > @@ -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 > Â Â Â Â Â Â * to the other PA endpoint over unix domain socket. */ > -Â Â Â Â if (type == PA_MEM_TYPE_SHARED_MEMFD) > -Â Â Â Â Â Â Â Â m->fd = fd; > -Â Â Â Â else { > +Â Â Â Â if (type != PA_MEM_TYPE_SHARED_MEMFD) { > Â Â Â Â Â Â Â Â Â pa_assert_se(pa_close(fd) == 0); > Â Â Â Â Â Â Â Â Â m->fd = -1; > Â Â Â Â Â } > +#if HAVE_MEMFD > +Â Â Â Â else > +Â Â Â Â Â Â Â Â m->fd = fd; > +#endif > Â > Â Â Â Â Â return 0; Looks good to me. -- Tanu