summaryrefslogtreecommitdiff
path: root/src/entry.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/entry.cc')
-rw-r--r--src/entry.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/entry.cc b/src/entry.cc
index 4309f9d9..5082b34a 100644
--- a/src/entry.cc
+++ b/src/entry.cc
@@ -61,14 +61,14 @@ entry_base_t::~entry_base_t()
item_t::state_t entry_base_t::state() const
{
bool first = true;
- state_t result = UNCLEARED;
+ state_t result = CLEARED;
foreach (xact_t * xact, xacts) {
- if ((result == UNCLEARED && xact->_state != UNCLEARED) ||
- (result == PENDING && xact->_state == CLEARED))
- result = xact->_state;
+ if (xact->_state == UNCLEARED)
+ return UNCLEARED;
+ else if (xact->_state == PENDING)
+ result = PENDING;
}
-
return result;
}