From owner-svn-src-head@freebsd.org Fri Jul 14 16:05:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 205AEDA63EC; Fri, 14 Jul 2017 16:05:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D74066B068; Fri, 14 Jul 2017 16:05:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6EG5sGh049500; Fri, 14 Jul 2017 16:05:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6EG5suS049499; Fri, 14 Jul 2017 16:05:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201707141605.v6EG5suS049499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 14 Jul 2017 16:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320990 - head/lib/libthr/thread X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/lib/libthr/thread X-SVN-Commit-Revision: 320990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 16:05:56 -0000 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 ||