]> sigrok.org Git - libsigrokdecode.git/commitdiff
cjtag: Use ternary operator where possible.
authorUwe Hermann <redacted>
Wed, 8 Jan 2020 21:52:53 +0000 (22:52 +0100)
committerUwe Hermann <redacted>
Wed, 8 Jan 2020 23:15:02 +0000 (00:15 +0100)
decoders/cjtag/pd.py

index 9849b3ab46b6f45b63199bd78c9813d0dbb079e3..885ececf636a1cabdf93e9d5a9d88abdcd3807b1 100644 (file)
@@ -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