laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/simtrace2/+/30181 )


Change subject: firmware/sniffer: Fix programming error in PPS
......................................................................

firmware/sniffer: Fix programming error in PPS

process_byte_pps() would never enter the error path in which the
first byte would be != 0xff.  However, the caller already verified
this before calling process_byte_pps() so the error path should
never be hit anyway.

Change-Id: Ia74b6338219a6965e6bd35a6efcf369890e02d81
---
M firmware/libcommon/source/sniffer.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/81/30181/1

diff --git a/firmware/libcommon/source/sniffer.c 
b/firmware/libcommon/source/sniffer.c
index cbfa7c9..da5d743 100644
--- a/firmware/libcommon/source/sniffer.c
+++ b/firmware/libcommon/source/sniffer.c
@@ -595,7 +595,7 @@
        switch (pps_state) { /* see ISO/IEC 7816-3:2006 section 9.2 */
        case PPS_S_WAIT_PPSS: /*!< initial byte */
                flags = 0;
-               if (0xff) {
+               if (byte == 0xff) {
                        pps_cur[0] = byte;
                        pps_state = PPS_S_WAIT_PPS0; /* go to next state */
                } else {

--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/30181
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Ia74b6338219a6965e6bd35a6efcf369890e02d81
Gerrit-Change-Number: 30181
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to