[PATCH] raop: silence a Coverity complaint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-07-27 at 23:51 -0500, Hajime Fujita wrote:
> I thought I added this fix before but apparently not.
> Looks good to me. Thank you for bringing this up.

Thanks! I pushed this to "next".

> > On Jul 27, 2017, at 8:07 PM, Tanu Kaskinen <tanuk at iki.fi> wrote:
> > 
> > CID: 1398155
> > ---
> > src/modules/raop/raop-sink.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> > 
> > diff --git a/src/modules/raop/raop-sink.c b/src/modules/raop/raop-sink.c
> > index e5d219e87..4d13927fc 100644
> > --- a/src/modules/raop/raop-sink.c
> > +++ b/src/modules/raop/raop-sink.c
> > @@ -391,6 +391,13 @@ static void thread_func(void *userdata) {
> >         if (!pa_raop_client_can_stream(u->raop))
> >             continue;
> > 
> > +        /* This assertion is meant to silence a complaint from Coverity about
> > +         * pollfd being possibly NULL when we access it later. That's a false
> > +         * positive, because we check pa_raop_client_can_stream() above, and if
> > +         * that returns true, it means that the connection is up, and when the
> > +         * connection is up, pollfd will be non-NULL. */
> > +        pa_assert(pollfd);
> > +
> >         if (u->memchunk.length <= 0) {
> >             if (u->memchunk.memblock)
> >                 pa_memblock_unref(u->memchunk.memblock);
> > -- 
> > 2.13.2
> > 
> 
> 
-- 
Tanu

https://www.patreon.com/tanuk


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux