Skip to content

Commit dafbf27

Browse files
committed
crypto: Fix "refence count" typo
Rename the reference count variable to something shorter and avoid using the mispelling "refence".
1 parent 9744767 commit dafbf27

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_crypto_partition.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ typedef struct psa_spm_hash_clone_s {
3434
} psa_spm_hash_clone_t;
3535

3636
// ---------------------------------- Globals ----------------------------------
37-
static int psa_spm_init_refence_counter = 0;
37+
static int psa_spm_init_count = 0;
3838

3939
/* maximal memory allocation for reading large hash or mac input buffers.
4040
the data will be read in chunks of size */
@@ -138,8 +138,8 @@ static void psa_crypto_init_operation(void)
138138
case PSA_IPC_CALL: {
139139
status = psa_crypto_init();
140140
if (status == PSA_SUCCESS) {
141-
++psa_spm_init_refence_counter;
142-
if (psa_spm_init_refence_counter == 1) {
141+
++psa_spm_init_count;
142+
if (psa_spm_init_count == 1) {
143143
memset(psa_spm_hash_clones, 0, sizeof(psa_spm_hash_clones));
144144
psa_crypto_access_control_init();
145145
}
@@ -175,11 +175,11 @@ static void psa_crypto_free_operation(void)
175175
/** perform crypto_free iff the number of init-s
176176
* is equal to the number of free-s
177177
*/
178-
if (psa_spm_init_refence_counter > 0) {
179-
--psa_spm_init_refence_counter;
178+
if (psa_spm_init_count > 0) {
179+
--psa_spm_init_count;
180180
}
181181

182-
if (psa_spm_init_refence_counter == 0) {
182+
if (psa_spm_init_count == 0) {
183183
memset(psa_spm_hash_clones, 0, sizeof(psa_spm_hash_clones));
184184
psa_crypto_access_control_destroy();
185185
mbedtls_psa_crypto_free();

0 commit comments

Comments
 (0)