svn commit: r320990 - head/lib/libthr/thread
Konstantin Belousov
kostikbel at gmail.com
Fri Jul 14 16:28:12 UTC 2017
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 ||
More information about the svn-src-all
mailing list