subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1301086 - /subversion/trunk/subversion/include/private/svn_mutex.h
Date Thu, 15 Mar 2012 16:58:00 GMT
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



Mime
View raw message