trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [1/2] trafficserver git commit: Fix indentation /style.
Date Wed, 07 Jan 2015 17:12:10 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 8bc71f82b -> a41b4fe5d


Fix indentation /style.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/70b0f238
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/70b0f238
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/70b0f238

Branch: refs/heads/master
Commit: 70b0f2382751b6bc43206c7b49336b4bfc9bb826
Parents: 8bc71f8
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Wed Jan 7 09:45:56 2015 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Wed Jan 7 09:45:56 2015 -0700

----------------------------------------------------------------------
 lib/ts/ink_rwlock.cc | 36 ++++++++++++++----------------------
 1 file changed, 14 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/70b0f238/lib/ts/ink_rwlock.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_rwlock.cc b/lib/ts/ink_rwlock.cc
index 0a6b6e3..7047f83 100644
--- a/lib/ts/ink_rwlock.cc
+++ b/lib/ts/ink_rwlock.cc
@@ -31,7 +31,6 @@
 int
 ink_rwlock_init(ink_rwlock * rw)
 {
-
   int result;
 
   if ((result = ink_mutex_init(&rw->rw_mutex, NULL)) != 0)
@@ -43,10 +42,10 @@ ink_rwlock_init(ink_rwlock * rw)
   rw->rw_refcount = 0;
   rw->rw_magic = RW_MAGIC;
 
-  return (0);
+  return 0;
 
 Lerror:
-  return (result);              /* an errno value */
+  return result;              /* an errno value */
 
 }
 
@@ -57,18 +56,17 @@ Lerror:
 int
 ink_rwlock_destroy(ink_rwlock * rw)
 {
-
   if (rw->rw_magic != RW_MAGIC)
-    return (EINVAL);
+    return EINVAL;
   if (rw->rw_refcount != 0 || rw->rw_nwaitreaders != 0 || rw->rw_nwaitwriters !=
0)
-    return (EBUSY);
+    return EBUSY;
 
   ink_mutex_destroy(&rw->rw_mutex);
   ink_cond_destroy(&rw->rw_condreaders);
   ink_cond_destroy(&rw->rw_condwriters);
   rw->rw_magic = 0;
 
-  return (0);
+  return 0;
 }
 
 //-------------------------------------------------------------------------
@@ -78,14 +76,13 @@ ink_rwlock_destroy(ink_rwlock * rw)
 int
 ink_rwlock_rdlock(ink_rwlock * rw)
 {
-
   int result;
 
   if (rw->rw_magic != RW_MAGIC)
-    return (EINVAL);
+    return EINVAL;
 
   if ((result = ink_mutex_acquire(&rw->rw_mutex)) != 0)
-    return (result);
+    return result;
 
   /* give preference to waiting writers */
   while (rw->rw_refcount < 0 || rw->rw_nwaitwriters > 0) {
@@ -97,8 +94,7 @@ ink_rwlock_rdlock(ink_rwlock * rw)
 
   ink_mutex_release(&rw->rw_mutex);
 
-  return (0);
-
+  return 0;
 }
 
 //-------------------------------------------------------------------------
@@ -108,14 +104,13 @@ ink_rwlock_rdlock(ink_rwlock * rw)
 int
 ink_rwlock_wrlock(ink_rwlock * rw)
 {
-
   int result;
 
   if (rw->rw_magic != RW_MAGIC)
-    return (EINVAL);
+    return EINVAL;
 
   if ((result = ink_mutex_acquire(&rw->rw_mutex)) != 0)
-    return (result);
+    return result;
 
   while (rw->rw_refcount != 0) {
     rw->rw_nwaitwriters++;
@@ -126,8 +121,7 @@ ink_rwlock_wrlock(ink_rwlock * rw)
 
   ink_mutex_release(&rw->rw_mutex);
 
-  return (0);
-
+  return 0;
 }
 
 //-------------------------------------------------------------------------
@@ -137,14 +131,13 @@ ink_rwlock_wrlock(ink_rwlock * rw)
 int
 ink_rwlock_unlock(ink_rwlock * rw)
 {
-
   int result;
 
   if (rw->rw_magic != RW_MAGIC)
-    return (EINVAL);
+    return EINVAL;
 
   if ((result = ink_mutex_acquire(&rw->rw_mutex)) != 0)
-    return (result);
+    return result;
 
   if (rw->rw_refcount > 0)
     rw->rw_refcount--;          /* releasing a reader */
@@ -162,6 +155,5 @@ ink_rwlock_unlock(ink_rwlock * rw)
 
   ink_mutex_release(&rw->rw_mutex);
 
-  return (0);
-
+  return 0;
 }


Mime
View raw message