Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2017 16:05:54 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320990 - head/lib/libthr/thread
Message-ID:  <201707141605.v6EG5suS049499@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
  
  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?201707141605.v6EG5suS049499>