]> sigrok.org Git - libsigrokdecode.git/commitdiff
ieee488: Simplify _get_raw_byte() a bit.
authorUwe Hermann <redacted>
Fri, 6 Dec 2019 21:25:55 +0000 (22:25 +0100)
committerUwe Hermann <redacted>
Fri, 6 Dec 2019 21:25:55 +0000 (22:25 +0100)
decoders/ieee488/pd.py

index 5c25c668b50c38e18d1501e3e9dcb1b00c1b3e04..ed3d39b5fb2b1a459d7de9ac9d57989308680bc2 100644 (file)
@@ -145,10 +145,7 @@ def _is_msb_set(b):
 
 def _get_raw_byte(b, atn):
     # "Decorate" raw byte values for stacked decoders.
-    raw_byte = b
-    if atn:
-        raw_byte |= 0x100
-    return raw_byte
+    return b | 0x100 if atn else b
 
 def _get_raw_text(b, atn):
     return ['{leader}{data:02x}'.format(leader = '/' if atn else '', data = b)]