Skip to content

Commit 6092a41

Browse files
committed
[STSAFEA] Fix stsafea_perso_info_set_cmd_AC invalid cast
1 parent 39993df commit 6092a41

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

services/stsafea/stsafea_commands.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,17 @@ void stsafea_perso_info_get_ext_rsp_encrypt_flag (stse_perso_info_t* pPerso,PLAT
222222

223223
void stsafea_perso_info_set_cmd_AC (stse_perso_info_t* pPerso , PLAT_UI8 command_code , stse_cmd_access_conditions_t protection)
224224
{
225-
PLAT_UI8 offset = command_code + command_code;
226-
pPerso->cmd_AC_status &= (PLAT_UI64)~(0x03<<offset);
227-
pPerso->cmd_AC_status |= (PLAT_UI64)((PLAT_UI64)protection << offset);
225+
PLAT_UI8 offset = command_code + command_code;
226+
pPerso->cmd_AC_status &= (PLAT_UI64)~(((PLAT_UI64)0x03)<<offset);
227+
pPerso->cmd_AC_status |= (PLAT_UI64)((PLAT_UI64)protection << offset);
228228
}
229229

230230

231231
void stsafea_perso_info_set_ext_cmd_AC (stse_perso_info_t* pPerso , PLAT_UI8 command_code , stse_cmd_access_conditions_t protection)
232232
{
233-
PLAT_UI8 offset = command_code + command_code;
234-
pPerso->ext_cmd_AC_status &= (PLAT_UI64)~(0x03<<offset);
235-
pPerso->ext_cmd_AC_status |= (PLAT_UI64)((PLAT_UI64)protection << offset);
233+
PLAT_UI8 offset = command_code + command_code;
234+
pPerso->ext_cmd_AC_status &= (PLAT_UI64)~(((PLAT_UI64)0x03)<<offset);
235+
pPerso->ext_cmd_AC_status |= (PLAT_UI64)((PLAT_UI64)protection << offset);
236236
}
237237

238238

0 commit comments

Comments
 (0)