apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Rooney <roo...@electricjellyfish.net>
Subject Re: [PATCH] don't reference revents from poll() if no events were met
Date Sun, 02 Oct 2005 02:16:56 GMT
On 10/1/05, Jeff Trawick <trawick@gmail.com> wrote:
> Purify on Solaris pointed out that we were referencing uninitialized
> storage when checking revents.  It was uninitialized (by kernel/libc)
> because no conditions were met.
>
> Concerns?

The comment should be "caller should look at revents", not
"rtnevents".  It's setting rtnevents, based on the values of revents,
so revents is what is being read.  Also, it seems like you could
compare against i, not *nsds, and avoid having to dereference a
pointer, but I can't imagine that really matters in this sort of code.
 In concept the change seems fine though.

-garrett

Mime
View raw message