Date: Fri, 14 Jul 2017 19:28:06 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: "Pedro F. Giffuni" <pfg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320990 - head/lib/libthr/thread Message-ID: <20170714162806.GX1935@kib.kiev.ua> In-Reply-To: <201707141605.v6EG5suS049499@repo.freebsd.org> References: <201707141605.v6EG5suS049499@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 14, 2017 at 04:05:54PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Jul 14 16:05:54 2017 > New Revision: 320990 > URL: https://svnweb.freebsd.org/changeset/base/320990 > > Log: > libthr: 'count' is unsigned so don't check for negative values. count is unsigned but pthread_barrier.b_count is not. At very least, this change is half-done. > > Obtained from: DragonFlyBSD (git e7db8139) > > Modified: > head/lib/libthr/thread/thr_barrier.c > > Modified: head/lib/libthr/thread/thr_barrier.c > ============================================================================== > --- head/lib/libthr/thread/thr_barrier.c Fri Jul 14 15:42:12 2017 (r320989) > +++ head/lib/libthr/thread/thr_barrier.c Fri Jul 14 16:05:54 2017 (r320990) > @@ -100,7 +100,7 @@ _pthread_barrier_init(pthread_barrier_t *barrier, > pthread_barrier_t bar; > int pshared; > > - if (barrier == NULL || count <= 0) > + if (barrier == NULL || count == 0) > return (EINVAL); > > if (attr == NULL || *attr == NULL ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170714162806.GX1935>