Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 10BDC995E for ; Thu, 15 Mar 2012 16:58:21 +0000 (UTC) Received: (qmail 42580 invoked by uid 500); 15 Mar 2012 16:58:21 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 42538 invoked by uid 500); 15 Mar 2012 16:58:21 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 42422 invoked by uid 99); 15 Mar 2012 16:58:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 16:58:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 16:58:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 44BC3238897A; Thu, 15 Mar 2012 16:58:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1301086 - /subversion/trunk/subversion/include/private/svn_mutex.h Date: Thu, 15 Mar 2012 16:58:00 -0000 To: commits@subversion.apache.org From: julianfoad@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120315165800.44BC3238897A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: julianfoad Date: Thu Mar 15 16:57:59 2012 New Revision: 1301086 URL: http://svn.apache.org/viewvc?rev=1301086&view=rev Log: Tweak a macro. No functional change. * subversion/include/private/svn_mutex.h (SVN_MUTEX__WITH_LOCK): Use a temporary variable in the 'svn_mutex__' name space instead of the name 'm', to avoid potential name clashes. Use SVN_ERR instead of equivalent long-hand code, for clarity. Modified: subversion/trunk/subversion/include/private/svn_mutex.h Modified: subversion/trunk/subversion/include/private/svn_mutex.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_mutex.h?rev=1301086&r1=1301085&r2=1301086&view=diff ============================================================================== --- subversion/trunk/subversion/include/private/svn_mutex.h (original) +++ subversion/trunk/subversion/include/private/svn_mutex.h Thu Mar 15 16:57:59 2012 @@ -103,13 +103,11 @@ svn_mutex__unlock(svn_mutex__t *mutex, * @note Prefer using this macro instead of explicit lock aquisition and * release. */ -#define SVN_MUTEX__WITH_LOCK(mutex, expr) \ -do { \ - svn_mutex__t *m = (mutex); \ - svn_error_t *e = svn_mutex__lock(m); \ - if (e) return svn_error_trace(e); \ - e = svn_mutex__unlock(m, (expr)); \ - if (e) return svn_error_trace(e); \ +#define SVN_MUTEX__WITH_LOCK(mutex, expr) \ +do { \ + svn_mutex__t *svn_mutex__m = (mutex); \ + SVN_ERR(svn_mutex__lock(svn_mutex__m)); \ + SVN_ERR(svn_mutex__unlock(svn_mutex__m, (expr))); \ } while (0) #ifdef __cplusplus