laforge submitted this change.
firmware/sniffer: Make all global variables 'static'
None of those variables are used outside sniffer.c, so they can all be
static.
Change-Id: I8946acb6189d5ade57214295f0ba87f0608bad92
---
M firmware/libcommon/source/sniffer.c
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c
index da5d743..8deda9c 100644
--- a/firmware/libcommon/source/sniffer.c
+++ b/firmware/libcommon/source/sniffer.c
@@ -141,47 +141,47 @@
static struct ringbuf sniff_buffer;
/* Flags to know is the card status changed (see SIMTRACE_MSGT_DT_SNIFF_CHANGE flags) */
-volatile uint32_t change_flags = 0;
+static volatile uint32_t change_flags = 0;
/* ISO 7816 variables */
/*! ISO 7816-3 state */
-enum iso7816_3_sniff_state iso_state = ISO7816_S_RESET;
+static enum iso7816_3_sniff_state iso_state = ISO7816_S_RESET;
/*! ATR state */
-enum atr_sniff_state atr_state;
+static enum atr_sniff_state atr_state;
/*! ATR data
* @remark can be used to check later protocol changes
*/
-uint8_t atr[MAX_ATR_SIZE];
+static uint8_t atr[MAX_ATR_SIZE];
/*! Current index in the ATR data */
-uint8_t atr_i = 0;
+static uint8_t atr_i = 0;
/*! If convention conversion is needed */
-bool convention_convert = false;
+static bool convention_convert = false;
/*! The supported T protocols */
-uint16_t t_protocol_support = 0;
+static uint16_t t_protocol_support = 0;
/*! PPS state
* @remark it is shared between request and response since they aren't simultaneous but follow the same procedure
*/
-enum pps_sniff_state pps_state;
+static enum pps_sniff_state pps_state;
/*! PPS request data
* @remark can be used to check PPS response
*/
-uint8_t pps_req[MAX_PPS_SIZE];
+static uint8_t pps_req[MAX_PPS_SIZE];
/*! PPS response data */
-uint8_t pps_rsp[MAX_PPS_SIZE];
+static uint8_t pps_rsp[MAX_PPS_SIZE];
/*! TPDU state */
-enum tpdu_sniff_state tpdu_state;
+static enum tpdu_sniff_state tpdu_state;
/*! Final TPDU packet
* @note this is the complete command+response TPDU, including header, data, and status words
* @remark this does not include the procedure bytes
*/
-uint8_t tpdu_packet[5+256+2];
+static uint8_t tpdu_packet[5+256+2];
/*! Current index in TPDU packet */
-uint16_t tpdu_packet_i = 0;
+static uint16_t tpdu_packet_i = 0;
/*! Waiting Time (WT)
* @note defined in ISO/IEC 7816-3:2006(E) section 8.1 and 10.2
*/
-uint32_t wt = 9600;
+static uint32_t wt = 9600;
/*------------------------------------------------------------------------------
* Internal functions
To view, visit change 30182. To unsubscribe, or for help writing mail filters, visit settings.