From nobody@FreeBSD.org  Wed Feb 23 15:33:23 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D48831065697
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 Feb 2011 15:33:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C3EBD8FC25
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 Feb 2011 15:33:23 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1NFXN95075000
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 Feb 2011 15:33:23 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1NFXNBi074990;
	Wed, 23 Feb 2011 15:33:23 GMT
	(envelope-from nobody)
Message-Id: <201102231533.p1NFXNBi074990@red.freebsd.org>
Date: Wed, 23 Feb 2011 15:33:23 GMT
From: "Eduard S. Markelov" <MarkelovEduard@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: typo in source code
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154975
>Category:       misc
>Synopsis:       typo in source code
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 23 15:40:06 UTC 2011
>Closed-Date:    Wed Feb 23 15:51:06 UTC 2011
>Last-Modified:  Wed Feb 23 15:51:06 UTC 2011
>Originator:     Eduard S. Markelov
>Release:        8.1-RELEASE
>Organization:
>Environment:
FreeBSD sirius.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Typo in macro definition.

File: /usr/include/pthread.h
Line: 170
Macro: pthread_cleanup_push(cleanup_routine, cleanup_arg)

Description:
The macro no have the close brace but end with one more open brace!

Code:

#define pthread_cleanup_push(cleanup_routine, cleanup_arg) \
 { \
 struct _pthread_cleanup_info __cleanup_info__; \
 __pthread_cleanup_push_imp(cleanup_routine, cleanup_arg, \
 &__cleanup_info__); \
 {

>How-To-Repeat:

>Fix:
change open brace to close brace:

#define pthread_cleanup_push(cleanup_routine, cleanup_arg) \
 { \
 struct _pthread_cleanup_info __cleanup_info__; \
 __pthread_cleanup_push_imp(cleanup_routine, cleanup_arg, \
 &__cleanup_info__); \
 }

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dchagin 
State-Changed-When: Wed Feb 23 15:49:37 UTC 2011 
State-Changed-Why:  
Matching pairs of pthread_cleanup_push and pthread_cleanup_pop must occur 
in the same function, at the same level of block nesting. Actually, 
pthread_cleanup_push and pthread_cleanup_pop are macros, and the expansion 
of pthread_cleanup_push introduces an open brace { with the matching closing brace } 
being introduced by the expansion of the matching pthread_cleanup_pop. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154975 
>Unformatted:
