cvs commit: src/sys/kern kern_umtx.c

Nate Lawson nate at root.org
Wed Jul 23 15:36:00 PDT 2003


On Wed, 23 Jul 2003, Mike Makonnen wrote:
> On Wed, Jul 23, 2003 at 01:29:13PM -0700, Peter Wemm wrote:
> > peter       2003/07/23 13:29:13 PDT
> >     sys/kern             kern_umtx.c
> >   Log:
> >   Initialize 'blocked' to NULL.  I think this was a real problem, but I
> >   am not sure about that.  The lack of -Werror and the inline noise hid
> >   this for a while.
>
> No, I don't think it was a problem. It does get initialized before
> use in the same if.. statement it is compared in:
>
> 	uq = umtx_lookup(td, umtx);
> 	if (uq == NULL ||
> 	    (uq != NULL && (blocked = TAILQ_FIRST(&uq->uq_tdq)) != NULL &&
>                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> It might be against style, though.

That isn't an initialization, that's assignment.

-Nate


More information about the cvs-src mailing list