Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnywong committed Mar 11, 2017
1 parent 54cd8d7 commit 3ec3dd6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions got_hook.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ GotHook::~GotHook() {
return;
}
// last object should be delete first, to make sure that GOT value can be restore to the right one.
EXPECT_TRUE(!g_object_stack.empty()
&& object_id_ == g_object_stack.top()) << "last new GotHook object should be deleted first";
EXPECT_TRUE(!g_object_stack.empty() && object_id_ == g_object_stack.top()) << "last object should destruct first";
// if the deleting object is on the top or in the middle of the stack, then restore GOT value to original.
// otherwise, an object before this has been deleted, may not be able to restore GOT value to original correctly.
if (!g_object_stack.empty() && object_id_ <= g_object_stack.top()) {
Expand Down

0 comments on commit 3ec3dd6

Please sign in to comment.