Change in simtrace2[master]: cosmetic: put spaces around operations
Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9919 ) Change subject: cosmetic: put spaces around operations .. cosmetic: put spaces around operations Change-Id: If5ba5f8d16680e8403944274336ea595017063db --- M firmware/libcommon/source/sniffer.c 1 file changed, 72 insertions(+), 72 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c index 5ab60bb..81a6712 100644 --- a/firmware/libcommon/source/sniffer.c +++ b/firmware/libcommon/source/sniffer.c @@ -208,10 +208,10 @@ static uint8_t wt_wi = 10; /* Waiting time Integer (WI), used to calculate the Waiting Time (WT) */ static uint8_t wt_d = 1; /* baud rate adjustment integer (the actual value, not the table index) */ - if (0!=wi) { + if (0 != wi) { wt_wi = wi; } - if (0!=d) { + if (0 != d) { wt_d = d; } wt = wt_wi*960UL*wt_d; @@ -257,7 +257,7 @@ static void change_state(enum iso7816_3_sniff_state iso_state_new) { /* sanity check */ - if (iso_state_new==iso_state) { + if (iso_state_new == iso_state) { TRACE_WARNING("Already in ISO 7816 state %u\n\r", iso_state); return; } @@ -303,11 +303,11 @@ static void usb_send_atr(bool complete) { /* Check state */ - if (ISO7816_S_IN_ATR!=iso_state) { + if (ISO7816_S_IN_ATR != iso_state) { TRACE_WARNING("Can't print ATR in ISO 7816-3 state %u\n\r", iso_state); return; } - if (atr_i>=ARRAY_SIZE(atr)) { + if (atr_i >= ARRAY_SIZE(atr)) { TRACE_ERROR("ATR buffer overflow\n\r"); return; } @@ -346,11 +346,11 @@ static uint8_t i = 0; /* interface byte subgroup number */ /* sanity check */ - if (ISO7816_S_IN_ATR!=iso_state) { + if (ISO7816_S_IN_ATR != iso_state) { TRACE_ERROR("Processing ATR data in wrong ISO 7816-3 state %u\n\r", iso_state); return; } - if (atr_i>=ARRAY_SIZE(atr)) { + if (atr_i >= ARRAY_SIZE(atr)) { TRACE_ERROR("ATR data overflow\n\r"); return; } @@ -377,37 +377,37 @@ break; case ATR_S_WAIT_T0: /* see ISO/IEC 7816-3:2006 section 8.2.2 */ case ATR_S_WAIT_TD: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ - if (ATR_S_WAIT_T0==atr_state) { - atr_hist_len = (byte&0x0f); /* save the number of historical bytes */ - } else if (ATR_S_WAIT_TD==atr_state) { - t_protocol_support |= (1<<(byte&0x0f)); /* remember supported protocol to know if TCK will be present */ + if (ATR_S_WAIT_T0 == atr_state) { + atr_hist_len = (byte & 0x0f); /* save the number of historical bytes */ + } else if (ATR_S_WAIT_TD == atr_state) { + t_protocol_support |= (1<<(byte & 0x0f)); /* remember supported protocol to know if TCK will be present */ } - y = (byte&0xf0); /* remember upcoming interface bytes */ + y = (byte & 0xf0); /* remember upcoming interface bytes */ i++; /* next interface byte sub-group is coming */ - if (y&0x10) { + if (y & 0x10) { atr_state = ATR_S_WAIT_TA; /* wait for interface byte TA */ break; } case ATR_S_WAIT_TA: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ - if (y&0x20) { + if (y & 0x20) { atr_state = ATR_S_WAIT_TB; /* wait for interface byte TB */ break; } case ATR_S_WAIT_TB: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ - if (y&0x40) { + if (y & 0x40) { atr_state = ATR_S_WAIT_TC; /* wait for interface byte TC */ break; } case ATR_S_WAIT_TC: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ /* retrieve WI encoded in TC2*/ if (ATR_S_WAIT_TC==atr_state && 2==i) { - if (0==byte) { + if (0 == byte) { update_wt(10, 0); } else { update_wt(byte, 0); } } - if (y&0x80) { + if (y & 0x80) { atr_state = ATR_S_WAIT_TD; /* wait for interface byte TD */ break; } else if (atr_hist_len) { @@ -418,8 +418,8 @@ if (atr_hist_len) { atr_hist_len--;
Change in simtrace2[master]: cosmetic: put spaces around operations
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/9919 ) Change subject: cosmetic: put spaces around operations .. Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/9919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5ba5f8d16680e8403944274336ea595017063db Gerrit-Change-Number: 9919 Gerrit-PatchSet: 5 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 11 Jul 2018 19:53:14 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in simtrace2[master]: cosmetic: put spaces around operations
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/9919 to look at the new patch set (#5). Change subject: cosmetic: put spaces around operations .. cosmetic: put spaces around operations Change-Id: If5ba5f8d16680e8403944274336ea595017063db --- M firmware/libcommon/source/sniffer.c 1 file changed, 72 insertions(+), 72 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/19/9919/5 -- To view, visit https://gerrit.osmocom.org/9919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If5ba5f8d16680e8403944274336ea595017063db Gerrit-Change-Number: 9919 Gerrit-PatchSet: 5 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Jenkins Builder
Change in simtrace2[master]: cosmetic: put spaces around operations
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/9919 to look at the new patch set (#2). Change subject: cosmetic: put spaces around operations .. cosmetic: put spaces around operations Change-Id: If5ba5f8d16680e8403944274336ea595017063db --- M firmware/libcommon/source/sniffer.c 1 file changed, 72 insertions(+), 72 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/19/9919/2 -- To view, visit https://gerrit.osmocom.org/9919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If5ba5f8d16680e8403944274336ea595017063db Gerrit-Change-Number: 9919 Gerrit-PatchSet: 2 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Jenkins Builder
Change in simtrace2[master]: cosmetic: put spaces around operations
Kévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/9919 Change subject: cosmetic: put spaces around operations .. cosmetic: put spaces around operations Change-Id: If5ba5f8d16680e8403944274336ea595017063db --- M firmware/libcommon/source/sniffer.c 1 file changed, 72 insertions(+), 72 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/19/9919/1 diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c index 5ab60bb..81a6712 100644 --- a/firmware/libcommon/source/sniffer.c +++ b/firmware/libcommon/source/sniffer.c @@ -208,10 +208,10 @@ static uint8_t wt_wi = 10; /* Waiting time Integer (WI), used to calculate the Waiting Time (WT) */ static uint8_t wt_d = 1; /* baud rate adjustment integer (the actual value, not the table index) */ - if (0!=wi) { + if (0 != wi) { wt_wi = wi; } - if (0!=d) { + if (0 != d) { wt_d = d; } wt = wt_wi*960UL*wt_d; @@ -257,7 +257,7 @@ static void change_state(enum iso7816_3_sniff_state iso_state_new) { /* sanity check */ - if (iso_state_new==iso_state) { + if (iso_state_new == iso_state) { TRACE_WARNING("Already in ISO 7816 state %u\n\r", iso_state); return; } @@ -303,11 +303,11 @@ static void usb_send_atr(bool complete) { /* Check state */ - if (ISO7816_S_IN_ATR!=iso_state) { + if (ISO7816_S_IN_ATR != iso_state) { TRACE_WARNING("Can't print ATR in ISO 7816-3 state %u\n\r", iso_state); return; } - if (atr_i>=ARRAY_SIZE(atr)) { + if (atr_i >= ARRAY_SIZE(atr)) { TRACE_ERROR("ATR buffer overflow\n\r"); return; } @@ -346,11 +346,11 @@ static uint8_t i = 0; /* interface byte subgroup number */ /* sanity check */ - if (ISO7816_S_IN_ATR!=iso_state) { + if (ISO7816_S_IN_ATR != iso_state) { TRACE_ERROR("Processing ATR data in wrong ISO 7816-3 state %u\n\r", iso_state); return; } - if (atr_i>=ARRAY_SIZE(atr)) { + if (atr_i >= ARRAY_SIZE(atr)) { TRACE_ERROR("ATR data overflow\n\r"); return; } @@ -377,37 +377,37 @@ break; case ATR_S_WAIT_T0: /* see ISO/IEC 7816-3:2006 section 8.2.2 */ case ATR_S_WAIT_TD: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ - if (ATR_S_WAIT_T0==atr_state) { - atr_hist_len = (byte&0x0f); /* save the number of historical bytes */ - } else if (ATR_S_WAIT_TD==atr_state) { - t_protocol_support |= (1<<(byte&0x0f)); /* remember supported protocol to know if TCK will be present */ + if (ATR_S_WAIT_T0 == atr_state) { + atr_hist_len = (byte & 0x0f); /* save the number of historical bytes */ + } else if (ATR_S_WAIT_TD == atr_state) { + t_protocol_support |= (1<<(byte & 0x0f)); /* remember supported protocol to know if TCK will be present */ } - y = (byte&0xf0); /* remember upcoming interface bytes */ + y = (byte & 0xf0); /* remember upcoming interface bytes */ i++; /* next interface byte sub-group is coming */ - if (y&0x10) { + if (y & 0x10) { atr_state = ATR_S_WAIT_TA; /* wait for interface byte TA */ break; } case ATR_S_WAIT_TA: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ - if (y&0x20) { + if (y & 0x20) { atr_state = ATR_S_WAIT_TB; /* wait for interface byte TB */ break; } case ATR_S_WAIT_TB: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ - if (y&0x40) { + if (y & 0x40) { atr_state = ATR_S_WAIT_TC; /* wait for interface byte TC */ break; } case ATR_S_WAIT_TC: /* see ISO/IEC 7816-3:2006 section 8.2.3 */ /* retrieve WI encoded in TC2*/ if (ATR_S_WAIT_TC==atr_state && 2==i) { - if (0==byte) { + if (0 == byte) { update_wt(10, 0); } else { update_wt(byte, 0); } } - if (y&0x80) { + if (y & 0x80) { atr_state = ATR_S_WAIT_TD; /* wait for interface byte TD */ break; } else if (atr_hist_len) { @@ -418,8 +418,8 @@ if (atr_hist_len) { atr_hist_len--; } -