summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2020-01-08 22:52:53 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2020-01-09 00:15:02 +0100
commit7aab31bb8a46aeaded3ba682cc3ebfc22a70dbcd (patch)
treea2633cfb8c63d1229b5d7a396e7f5d69bc9428ed
parentd315969c893bb62dca66433877765a5092e7c33d (diff)
downloadlibsigrokdecode-7aab31bb8a46aeaded3ba682cc3ebfc22a70dbcd.tar.gz
libsigrokdecode-7aab31bb8a46aeaded3ba682cc3ebfc22a70dbcd.zip
cjtag: Use ternary operator where possible.
-rw-r--r--decoders/cjtag/pd.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/decoders/cjtag/pd.py b/decoders/cjtag/pd.py
index 9849b3a..885ecec 100644
--- a/decoders/cjtag/pd.py
+++ b/decoders/cjtag/pd.py
@@ -307,10 +307,7 @@ class Decoder(srd.Decoder):
if self.cjtagstate == 'OSCAN1':
if self.oscan1cycle == 0: # nTDI
- if tms == 0:
- tdi_real = 1
- else:
- tdi_real = 0
+ tdi_real = 1 if (tms == 0) else 0
self.oscan1cycle = 1
elif self.oscan1cycle == 1: # TMS
tms_real = tms