summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2014-05-31 18:00:23 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2014-05-31 18:00:23 -0700
commit0be64ffe2f4ff8824b3084362706ffbf456ea490 (patch)
tree795d803dcfaa3b92faa1155ce2c835daf2d76290 /src/mem/slicc/ast
parent2a8088f5aec433b6a1a2330f4fbc29ae28b5ee73 (diff)
downloadgem5-0be64ffe2f4ff8824b3084362706ffbf456ea490.tar.xz
style: eliminate equality tests with true and false
Using '== true' in a boolean expression is totally redundant, and using '== false' is pretty verbose (and arguably less readable in most cases) compared to '!'. It's somewhat of a pet peeve, perhaps, but I had some time waiting for some tests to run and decided to clean these up. Unfortunately, SLICC appears not to have the '!' operator, so I had to leave the '== false' tests in the SLICC code.
Diffstat (limited to 'src/mem/slicc/ast')
-rw-r--r--src/mem/slicc/ast/PeekStatementAST.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mem/slicc/ast/PeekStatementAST.py b/src/mem/slicc/ast/PeekStatementAST.py
index a9816bd3d..d267df26e 100644
--- a/src/mem/slicc/ast/PeekStatementAST.py
+++ b/src/mem/slicc/ast/PeekStatementAST.py
@@ -68,12 +68,11 @@ class PeekStatementAST(StatementAST):
if self.pairs.has_key("block_on"):
address_field = self.pairs['block_on']
code('''
- if ( (m_is_blocking == true) &&
- (m_block_map.count(in_msg_ptr->m_$address_field) == 1) ) {
- if (m_block_map[in_msg_ptr->m_$address_field] != &$qcode) {
+ if (m_is_blocking &&
+ (m_block_map.count(in_msg_ptr->m_$address_field) == 1) &&
+ (m_block_map[in_msg_ptr->m_$address_field] != &$qcode)) {
$qcode.delayHead();
continue;
- }
}
''')