[TS-1278] Fix clang warning: assign into a variable to force a volatile load

Fix this by merging the assignment with the assert.


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

Branch: refs/heads/master
Commit: 57035900278a94310705c48200b098dc0cf2c164
Parents: 4ed0234
Author: Igor Galić <[email protected]>
Authored: Fri Jul 20 21:06:08 2012 -0700
Committer: Igor Galić <[email protected]>
Committed: Fri Jul 20 21:06:08 2012 -0700

----------------------------------------------------------------------
 iocore/eventsystem/I_Lock.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/57035900/iocore/eventsystem/I_Lock.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_Lock.h b/iocore/eventsystem/I_Lock.h
index 715ea29..f99922f 100644
--- a/iocore/eventsystem/I_Lock.h
+++ b/iocore/eventsystem/I_Lock.h
@@ -400,8 +400,7 @@ Mutex_trylock(
 #endif //DEBUG
       return false;
     }
-    m->thread_holding = t;
-    ink_assert(m->thread_holding);
+    ink_assert(m->thread_holding = t);
 #ifdef DEBUG
     m->file = afile;
     m->line = aline;

Reply via email to