[libxcb,08/18] c_client.py: no need to compare bools to True/False

Submitted by Ran Benita on Oct. 12, 2014, 6:58 p.m.

Details

Message ID 1413140300-20075-9-git-send-email-ran234@gmail.com
State Accepted
Headers show

Not browsing as part of any series.

Commit Message

Ran Benita Oct. 12, 2014, 6:58 p.m.
Signed-off-by: Ran Benita <ran234@gmail.com>
---
 src/c_client.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/c_client.py b/src/c_client.py
index 7051e44..3310db1 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -457,7 +457,7 @@  def _c_helper_field_mapping(complex_type, prefix, flat=False):
             else:
                 bitcase_prefix = prefix
 
-            if (True==flat and not b.type.has_name) or False==flat:
+            if (flat and not b.type.has_name) or not flat:
                 all_fields.update(_c_helper_field_mapping(b.type, bitcase_prefix, flat))
     else:
         for f in complex_type.fields:
@@ -466,7 +466,7 @@  def _c_helper_field_mapping(complex_type, prefix, flat=False):
                 raise Exception("field name %s has been registered before" % f.field_name)
 
             all_fields[f.field_name] = (fname, f)
-            if f.type.is_container and flat==False:
+            if f.type.is_container and not flat:
                 if f.type.is_case_or_bitcase and not f.type.has_name:
                     new_prefix = prefix
                 elif f.type.is_switch and len(f.type.parents)>1: